fix: correct Shortcuts
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -26,8 +26,9 @@ export default function Shortcuts({
|
||||
className={styles.link}
|
||||
href={shortcut.url}
|
||||
key={shortcut.title}
|
||||
target={shortcut.openInNewTab ? "_blank" : undefined}
|
||||
>
|
||||
<span>{shortcut.title}</span>
|
||||
<span>{shortcut.text ? shortcut.text : shortcut.title}</span>
|
||||
<Image
|
||||
alt="Chevron Icon"
|
||||
height={20}
|
||||
|
||||
Reference in New Issue
Block a user