From fa527aeddb578eb8e62af14cb2726944187d7f62 Mon Sep 17 00:00:00 2001 From: HangerThem Date: Tue, 4 Aug 2026 11:51:11 +0200 Subject: [PATCH] Fixed showing cover image for latest post even if it does not exist --- components/post/Post.tsx | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/components/post/Post.tsx b/components/post/Post.tsx index 9a7d001..e9a59a5 100644 --- a/components/post/Post.tsx +++ b/components/post/Post.tsx @@ -11,16 +11,8 @@ type PostProps = { } export function Post({ post, isLatest, showImageSlot }: PostProps) { - const { - title, - description, - category, - date, - coverImage, - coverImageAlt, - readingTimeText, - slug, - } = post + const { title, description, category, date, coverImage, coverImageAlt, readingTimeText, slug } = + post if (!title || !description || !date) { return null @@ -30,7 +22,7 @@ export function Post({ post, isLatest, showImageSlot }: PostProps) { return (
- {(isLatest || showImageSlot) && ( + {((isLatest && coverImage) || showImageSlot) && (
{coverImage && }