fix(SW-3084): Handle unpublished entries inside content pages

Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-08-14 07:24:35 +00:00
parent 04aebb372c
commit a362d236fb
5 changed files with 26 additions and 27 deletions

View File

@@ -44,6 +44,10 @@ export default function Sidebar({ blocks }: SidebarProps) {
/>
)
case SidebarEnums.blocks.ScriptedCard:
if (!block.scripted_card) {
return null
}
return (
<Card
key={block.scripted_card.system.uid}
@@ -57,6 +61,10 @@ export default function Sidebar({ blocks }: SidebarProps) {
/>
)
case SidebarEnums.blocks.TeaserCard:
if (!block.teaser_card) {
return null
}
return (
<TeaserCard
title={block.teaser_card.heading}