feat(SW-285): Ship support for ContentPageBlocksCardsGrid

This commit is contained in:
Chuma McPhoy
2024-09-02 10:23:21 +02:00
parent dd336ca4ab
commit e88e4d92bf
8 changed files with 320 additions and 5 deletions
+10 -1
View File
@@ -2,7 +2,8 @@ import JsonToHtml from "@/components/JsonToHtml"
// import DynamicContentBlock from "@/components/Loyalty/Blocks/DynamicContent"
import Shortcuts from "@/components/MyPages/Blocks/Shortcuts"
// import CardsGrid from "./CardsGrid"
import CardsGrid from "./CardsGrid"
import type { BlocksProps } from "@/types/components/content/blocks"
import { ContentBlocksTypenameEnum } from "@/types/components/content/enums"
@@ -29,6 +30,14 @@ export function Blocks({ blocks }: BlocksProps) {
title={block.shortcuts.title}
/>
)
case ContentBlocksTypenameEnum.ContentPageBlocksCardsGrid:
return (
<CardsGrid
cards_grid={block.cards_grid}
key={`${block.cards_grid.title}-${idx}`}
firstItem={firstItem}
/>
)
default:
return null
}