feat(WEB-304): remaning UI from design system primitives
This commit is contained in:
@@ -10,7 +10,8 @@ import { LoyaltyBlocksTypenameEnum } from "@/types/components/loyalty/enums"
|
||||
import { LangParams } from "@/types/params"
|
||||
|
||||
export function Blocks({ lang, blocks }: BlocksProps & LangParams) {
|
||||
return blocks.map((block) => {
|
||||
return blocks.map((block, idx) => {
|
||||
const firstItem = idx === 0
|
||||
switch (block.__typename) {
|
||||
case LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksCardsGrid:
|
||||
return <CardsGrid cards_grid={block.cards_grid} />
|
||||
@@ -34,7 +35,12 @@ export function Blocks({ lang, blocks }: BlocksProps & LangParams) {
|
||||
: undefined,
|
||||
}
|
||||
|
||||
return <DynamicContentBlock dynamicContent={dynamicContent} />
|
||||
return (
|
||||
<DynamicContentBlock
|
||||
dynamicContent={dynamicContent}
|
||||
firstItem={firstItem}
|
||||
/>
|
||||
)
|
||||
case LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksShortcuts:
|
||||
const shortcuts = block.shortcuts.shortcuts.map((shortcut) => ({
|
||||
...shortcut,
|
||||
@@ -42,6 +48,7 @@ export function Blocks({ lang, blocks }: BlocksProps & LangParams) {
|
||||
}))
|
||||
return (
|
||||
<Shortcuts
|
||||
firstItem={firstItem}
|
||||
shortcuts={shortcuts}
|
||||
title={block.shortcuts.title}
|
||||
subtitle={block.shortcuts.preamble}
|
||||
|
||||
Reference in New Issue
Block a user