From d1d5719086840aabcd611cc2ca1482f0f24843fd Mon Sep 17 00:00:00 2001 From: Petter Hohle Date: Thu, 19 Dec 2024 08:27:37 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Check=20for=20imageExtende?= =?UTF-8?q?d=20rather=20than=20hasImage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/sections/article/Article.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/sections/article/Article.tsx b/src/components/sections/article/Article.tsx index b60eed1c1..c4fbb15e0 100644 --- a/src/components/sections/article/Article.tsx +++ b/src/components/sections/article/Article.tsx @@ -14,7 +14,7 @@ export default function Article({ article }: ArticleProps) { return (
- {hasImage(article) && ( + {article.imageExtended && (
@@ -31,7 +31,3 @@ export default function Article({ article }: ArticleProps) {
); } - -function hasImage(article: ArticleSection) { - return Boolean(article?.imageExtended?.src || article?.imageExtended?.asset); -}