From 03daf0540e5802e02e83741ebe1833715e0c7ca3 Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Wed, 24 Apr 2024 16:15:46 +0200 Subject: [PATCH] fix: correct Shortcuts --- components/MyPages/AccountPage/Content.tsx | 10 +++++++--- components/MyPages/Blocks/Shortcuts/index.tsx | 3 ++- .../AccountPage/AccountPageContentShortcuts.graphql | 2 ++ types/components/myPages/myPage/shortcuts.ts | 8 +++++++- types/requests/myPages/accountpage.ts | 8 +++++--- 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/components/MyPages/AccountPage/Content.tsx b/components/MyPages/AccountPage/Content.tsx index b3e46a9a6..1b6a67218 100644 --- a/components/MyPages/AccountPage/Content.tsx +++ b/components/MyPages/AccountPage/Content.tsx @@ -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 ( - {shortcut.title} + {shortcut.text ? shortcut.text : shortcut.title} Chevron Icon + open_in_new_tab: boolean + text: string } type DynamicContent = {