fix: correct Shortcuts

This commit is contained in:
Arvid Norlin
2024-04-24 16:15:46 +02:00
parent dd2127749a
commit 03daf0540e
5 changed files with 23 additions and 8 deletions

View File

@@ -66,9 +66,13 @@ export default function Content({ user, lang, content }: ContentProps) {
/>
)
case ContentEntries.AccountPageContentShortcuts:
const shortcuts = item.shortcuts.shortcuts.map(
(shortcut) => shortcut.linkConnection.edges[0].node
)
const shortcuts = item.shortcuts.shortcuts.map((shortcut) => {
return {
text: shortcut.text,
openInNewTab: shortcut.open_in_new_tab,
...shortcut.linkConnection.edges[0].node,
}
})
return (
<Shortcuts
shortcuts={shortcuts}