From 31515721086e9e545136ce6abce6ae0e7c05a98b Mon Sep 17 00:00:00 2001 From: Chuma McPhoy Date: Mon, 16 Sep 2024 08:53:44 +0200 Subject: [PATCH] fix(SW-219): review comments --- components/Content/Blocks/CardsGrid/index.tsx | 51 +++++++++---------- types/components/contentCard.ts | 4 +- 2 files changed, 25 insertions(+), 30 deletions(-) diff --git a/components/Content/Blocks/CardsGrid/index.tsx b/components/Content/Blocks/CardsGrid/index.tsx index a647560f7..a03666bf3 100644 --- a/components/Content/Blocks/CardsGrid/index.tsx +++ b/components/Content/Blocks/CardsGrid/index.tsx @@ -22,34 +22,29 @@ export default function CardsGrid({ {cards_grid.cards.map((card) => { switch (card.__typename) { - case CardsGridEnum.Card: { - if (card.isContentCard) { - return ( - - ) - } else { - return ( - - ) - } - } + case CardsGridEnum.Card: + return card.isContentCard ? ( + + ) : ( + + ) case CardsGridEnum.LoyaltyCard: return (