fix(SW-438): add ContentCard, ScriptedCard and Shortcuts to ContentPage sidebar
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
import JsonToHtml from "@/components/JsonToHtml"
|
||||
|
||||
import ShortcutsList from "../Blocks/ShortcutsList"
|
||||
import Card from "../TempDesignSystem/Card"
|
||||
import TeaserCard from "../TempDesignSystem/TeaserCard"
|
||||
import JoinLoyaltyContact from "./JoinLoyalty"
|
||||
import MyPagesNavigation from "./MyPagesNavigation"
|
||||
|
||||
@@ -26,6 +29,19 @@ export default function Sidebar({ blocks }: SidebarProps) {
|
||||
/>
|
||||
</section>
|
||||
)
|
||||
case SidebarEnums.blocks.ContentCard:
|
||||
console.log("EEE", block.content_card)
|
||||
return (
|
||||
<TeaserCard
|
||||
{...block.content_card}
|
||||
title={block.content_card.heading}
|
||||
description={block.content_card.body_text}
|
||||
style={
|
||||
block.content_card.theme === "gray" ? "default" : "featured"
|
||||
}
|
||||
/>
|
||||
)
|
||||
|
||||
case SidebarEnums.blocks.DynamicContent:
|
||||
switch (block.dynamic_content.component) {
|
||||
case DynamicContentEnum.Sidebar.components.my_pages_navigation:
|
||||
@@ -40,6 +56,20 @@ export default function Sidebar({ blocks }: SidebarProps) {
|
||||
key={`${block.typename}-${idx}`}
|
||||
/>
|
||||
)
|
||||
case SidebarEnums.blocks.ScriptedCard:
|
||||
return (
|
||||
<Card
|
||||
{...block.scripted_card}
|
||||
bodyText={block.scripted_card.body_text}
|
||||
scriptedTopTitle={block.scripted_card.scripted_top_title}
|
||||
theme={block.scripted_card.theme ?? "image"}
|
||||
/>
|
||||
)
|
||||
|
||||
/*case SidebarEnums.blocks.Shortcuts:
|
||||
console.log("SSS", block)
|
||||
return <ShortcutsList {...block.shortcuts} />*/
|
||||
|
||||
default:
|
||||
return null
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user