refactor(SW-438): change name to teasercard

This commit is contained in:
Matilda Landström
2024-10-16 10:21:34 +02:00
parent 8eb822da16
commit df17798662
8 changed files with 60 additions and 62 deletions

View File

@@ -29,16 +29,6 @@ export default function Sidebar({ blocks }: SidebarProps) {
/>
</section>
)
case SidebarEnums.blocks.ContentCard:
return (
<TeaserCard
{...block.content_card}
title={block.content_card.heading}
description={block.content_card.body_text}
style={block.content_card.theme}
/>
)
case SidebarEnums.blocks.DynamicContent:
switch (block.dynamic_content.component) {
case DynamicContentEnum.Sidebar.components.my_pages_navigation:
@@ -62,7 +52,15 @@ export default function Sidebar({ blocks }: SidebarProps) {
theme={block.scripted_card.theme ?? "image"}
/>
)
case SidebarEnums.blocks.TeaserCard:
return (
<TeaserCard
{...block.teaser_card}
title={block.teaser_card.heading}
description={block.teaser_card.body_text}
style={block.teaser_card.theme}
/>
)
case SidebarEnums.blocks.QuickLinks:
return <ShortcutsList {...block.shortcuts} />