diff --git a/app/[lang]/(live)/(protected)/my-pages/layout.tsx b/app/[lang]/(live)/(protected)/my-pages/layout.tsx index 2b1aff1f2..fc73b48c5 100644 --- a/app/[lang]/(live)/(protected)/my-pages/layout.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/layout.tsx @@ -27,10 +27,15 @@ export default async function MyPagesLayout({ function mapMenuItems(navigationItems: NavigationItem[]) { return navigationItems.map(({ item }): MenuItem => { - const { title, uid } = item.pageConnection.edges[0].node + const { + title, + url, + system: { uid }, + } = item.pageConnection.edges[0].node return { title, uid, + url, linkText: item.link_text, subItems: item.sub_items ? mapMenuItems(item.sub_items) : null, } diff --git a/lib/graphql/Query/NavigationMyPages.graphql b/lib/graphql/Query/NavigationMyPages.graphql index 61a85d584..2fce36070 100644 --- a/lib/graphql/Query/NavigationMyPages.graphql +++ b/lib/graphql/Query/NavigationMyPages.graphql @@ -17,9 +17,15 @@ query GetNavigationMyPages { ... on CodeDefinedPage { title url + system { + uid + } } ... on ContentPage { title + system { + uid + } } } } @@ -32,10 +38,16 @@ query GetNavigationMyPages { node { ... on ContentPage { title + system { + uid + } } ... on CodeDefinedPage { title url + system { + uid + } } } } diff --git a/types/requests/myPages/navigation.ts b/types/requests/myPages/navigation.ts index d92c61f58..2254574fd 100644 --- a/types/requests/myPages/navigation.ts +++ b/types/requests/myPages/navigation.ts @@ -11,7 +11,12 @@ export type MenuItem = { export type SidebarProps = { menuItems: MenuItem[] } -export type PageLink = { uid: string; title: string; url?: string } +export type PageLink = { + uid: string + title: string + url?: string + system: { uid: string } +} export type NavigationItem = { item: {