From 32cf13613c71472e8f2595cc8f397cdba2388c3c Mon Sep 17 00:00:00 2001 From: Christel Westerberg Date: Mon, 12 Feb 2024 13:51:06 +0100 Subject: [PATCH] fix: conditionally render subtitles --- components/Current/Blocks/List/ListItem.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/components/Current/Blocks/List/ListItem.tsx b/components/Current/Blocks/List/ListItem.tsx index 601c50ec5..975f7dbc4 100644 --- a/components/Current/Blocks/List/ListItem.tsx +++ b/components/Current/Blocks/List/ListItem.tsx @@ -53,8 +53,12 @@ export default function ListItem({ listItem }: { listItem: ListItem }) { > {listItem.list_item_external_link.link.title} -
- {listItem.list_item_external_link.subtitle} + {listItem.list_item_external_link.subtitle && ( + +
+ {listItem.list_item_external_link.subtitle} +
+ )} ) case BlockListItemsEnum.CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink: @@ -70,8 +74,12 @@ export default function ListItem({ listItem }: { listItem: ListItem }) { {listItem.list_item_internal_link.link_text} -
- {listItem.list_item_internal_link.subtitle} + {listItem.list_item_internal_link.subtitle && ( + +
+ {listItem.list_item_internal_link.subtitle} +
+ )} )