fix(SW-428): remove spreading

This commit is contained in:
Matilda Landström
2024-10-21 14:42:25 +02:00
parent 046f5d6196
commit 6bd9dc5b67

View File

@@ -46,7 +46,10 @@ export default function Sidebar({ blocks }: SidebarProps) {
case SidebarEnums.blocks.ScriptedCard: case SidebarEnums.blocks.ScriptedCard:
return ( return (
<Card <Card
{...block.scripted_card} key={block.scripted_card.system.uid}
heading={block.scripted_card.heading}
secondaryButton={block.scripted_card.secondaryButton}
primaryButton={block.scripted_card.primaryButton}
bodyText={block.scripted_card.body_text} bodyText={block.scripted_card.body_text}
scriptedTopTitle={block.scripted_card.scripted_top_title} scriptedTopTitle={block.scripted_card.scripted_top_title}
theme={block.scripted_card.theme ?? "image"} theme={block.scripted_card.theme ?? "image"}
@@ -55,10 +58,15 @@ export default function Sidebar({ blocks }: SidebarProps) {
case SidebarEnums.blocks.TeaserCard: case SidebarEnums.blocks.TeaserCard:
return ( return (
<TeaserCard <TeaserCard
{...block.teaser_card}
title={block.teaser_card.heading} title={block.teaser_card.heading}
description={block.teaser_card.body_text} description={block.teaser_card.body_text}
style={block.teaser_card.theme} style={block.teaser_card.theme}
key={block.teaser_card.system.uid}
primaryButton={block.teaser_card.primaryButton}
secondaryButton={block.teaser_card.secondaryButton}
sidePeekButton={block.teaser_card.sidePeekButton}
sidePeekContent={block.teaser_card.sidePeekContent}
image={block.teaser_card.image}
/> />
) )
case SidebarEnums.blocks.QuickLinks: case SidebarEnums.blocks.QuickLinks: