diff --git a/src/blocks/Showcase/Component.tsx b/src/blocks/Showcase/Component.tsx index 21c8709..7e73a7e 100644 --- a/src/blocks/Showcase/Component.tsx +++ b/src/blocks/Showcase/Component.tsx @@ -23,30 +23,12 @@ type ShowcaseBlockProps = { items?: ShowcaseItem[] } -function ShowcaseImage({ item }: { item: ShowcaseItem }) { - const imageUrl = item.image && typeof item.image === 'object' ? item.image.url : null - const imageAlt = item.image && typeof item.image === 'object' ? item.image.alt : item.title +function ShowcaseImage(props: { item: ShowcaseItem }): React.ReactElement { + const item = props.item + const imageUrl = item.image != null && typeof item.image === 'object' ? item.image.url : null + const imageAlt = item.image != null && typeof item.image === 'object' ? item.image.alt : item.title - const inner = imageUrl ? ( - <> - {imageAlt - {item.imageUrl && ( -
- )} - {item.imageUrl && ( -
-