fix(SW-438): fix refs

This commit is contained in:
Matilda Landström
2024-10-16 08:31:13 +02:00
parent e5eb6a5331
commit a5a3bfa857
5 changed files with 54 additions and 26 deletions

View File

@@ -171,17 +171,30 @@ export function getConnections({ content_page }: ContentPageRefs) {
connections.push(...block.content)
}
break
case ContentPageEnum.ContentStack.sidebar.ContentCard:
if (block.content_card?.length) {
connections.push(...block.content_card)
}
break
case ContentPageEnum.ContentStack.sidebar.JoinLoyaltyContact:
if (block.join_loyalty_contact?.button) {
connections.push(block.join_loyalty_contact.button)
}
break
case ContentPageEnum.ContentStack.sidebar.ScriptedCard:
if (block.scripted_card?.length) {
connections.push(...block.scripted_card)
}
break
case ContentPageEnum.ContentStack.sidebar.QuickLinks:
if (block.shortcuts.shortcuts.length) {
connections.push(...block.shortcuts.shortcuts)
}
break
default:
break
}
})
}
return connections
}