feat(WEB-304): remaning UI from design system primitives
This commit is contained in:
@@ -8,7 +8,8 @@ import type { BlocksProps } from "@/types/components/loyalty/blocks"
|
||||
import { LoyaltyBlocksTypenameEnum } from "@/types/components/loyalty/enums"
|
||||
|
||||
export function Blocks({ blocks }: BlocksProps) {
|
||||
return blocks.map((block) => {
|
||||
return blocks.map((block, idx) => {
|
||||
const firstItem = idx === 0
|
||||
switch (block.__typename) {
|
||||
case LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksContent:
|
||||
return (
|
||||
@@ -20,10 +21,16 @@ export function Blocks({ blocks }: BlocksProps) {
|
||||
</section>
|
||||
)
|
||||
case LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksDynamicContent:
|
||||
return <DynamicContentBlock dynamicContent={block.dynamic_content} />
|
||||
return (
|
||||
<DynamicContentBlock
|
||||
dynamicContent={block.dynamic_content}
|
||||
firstItem={firstItem}
|
||||
/>
|
||||
)
|
||||
case LoyaltyBlocksTypenameEnum.LoyaltyPageBlocksShortcuts:
|
||||
return (
|
||||
<Shortcuts
|
||||
firstItem={firstItem}
|
||||
shortcuts={block.shortcuts.shortcuts}
|
||||
subtitle={block.shortcuts.preamble}
|
||||
title={block.shortcuts.title}
|
||||
|
||||
Reference in New Issue
Block a user