fix: correct acount page linking
This commit is contained in:
@@ -44,8 +44,10 @@ export default function Content({ lang, content }: ContentProps) {
|
||||
case ContentEntries.AccountPageContentDynamicContent:
|
||||
const link = item.dynamic_content.link.linkConnection.edges.length
|
||||
? {
|
||||
href: item.dynamic_content.link.linkConnection.edges[0].node
|
||||
.url,
|
||||
href:
|
||||
item.dynamic_content.link.linkConnection.edges[0].node
|
||||
.original_url ||
|
||||
`/${lang}${item.dynamic_content.link.linkConnection.edges[0].node.url}`,
|
||||
text: item.dynamic_content.link.link_text,
|
||||
}
|
||||
: null
|
||||
@@ -64,16 +66,9 @@ export default function Content({ lang, content }: ContentProps) {
|
||||
/>
|
||||
)
|
||||
case ContentEntries.AccountPageContentShortcuts:
|
||||
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}
|
||||
shortcuts={item.shortcuts.shortcuts}
|
||||
subtitle={item.shortcuts.preamble}
|
||||
title={item.shortcuts.title}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user