From f4a0264019b36cd405729cf16f4af5070d14d5a5 Mon Sep 17 00:00:00 2001 From: Arvid Norlin Date: Thu, 11 Apr 2024 14:24:45 +0200 Subject: [PATCH] chore: remove references to obsolete CodeDefinedPage content type --- .../(live)/(protected)/my-pages/layout.tsx | 1 - lib/graphql/Fragments/PageLinks.graphql | 8 -------- lib/graphql/Query/NavigationMyPages.graphql | 2 -- types/requests/myPages/navigation.ts | 17 +---------------- 4 files changed, 1 insertion(+), 27 deletions(-) diff --git a/app/[lang]/(live)/(protected)/my-pages/layout.tsx b/app/[lang]/(live)/(protected)/my-pages/layout.tsx index 41c11dbfb..829ee1cd0 100644 --- a/app/[lang]/(live)/(protected)/my-pages/layout.tsx +++ b/app/[lang]/(live)/(protected)/my-pages/layout.tsx @@ -22,7 +22,6 @@ function getURL(node: PageLink) { return node.web.url case PageLinkEnum.AccountPage: case PageLinkEnum.LoyaltyPage: - case PageLinkEnum.CodeDefinedPage: return node.url } } diff --git a/lib/graphql/Fragments/PageLinks.graphql b/lib/graphql/Fragments/PageLinks.graphql index 25533652c..821451419 100644 --- a/lib/graphql/Fragments/PageLinks.graphql +++ b/lib/graphql/Fragments/PageLinks.graphql @@ -7,14 +7,6 @@ fragment CurrentBlocksPageLink on CurrentBlocksPage { url } -fragment CodeDefinedPageLink on CodeDefinedPage { - system { - uid - } - title - url -} - fragment AccountPageLink on AccountPage { system { uid diff --git a/lib/graphql/Query/NavigationMyPages.graphql b/lib/graphql/Query/NavigationMyPages.graphql index 66af4770e..939317135 100644 --- a/lib/graphql/Query/NavigationMyPages.graphql +++ b/lib/graphql/Query/NavigationMyPages.graphql @@ -19,7 +19,6 @@ query GetNavigationMyPages { __typename ...AccountPageLink ...LoyaltyPageLink - ...CodeDefinedPageLink ...ContentPageLink } } @@ -34,7 +33,6 @@ query GetNavigationMyPages { ...AccountPageLink ...LoyaltyPageLink ...ContentPageLink - ...CodeDefinedPageLink } } } diff --git a/types/requests/myPages/navigation.ts b/types/requests/myPages/navigation.ts index f743e38de..32d9e6e20 100644 --- a/types/requests/myPages/navigation.ts +++ b/types/requests/myPages/navigation.ts @@ -4,7 +4,6 @@ import { Typename } from "../utils/typename" export enum PageLinkEnum { AccountPage = "AccountPage", - CodeDefinedPage = "CodeDefinedPage", ContentPage = "ContentPage", LoyaltyPage = "LoyaltyPage", } @@ -38,16 +37,6 @@ export type LoyaltyPageLink = Typename< PageLinkEnum.LoyaltyPage > -export type CodeDefinedPageLink = Typename< - { - uid: string - title: string - url: string - system: { uid: string } - }, - PageLinkEnum.CodeDefinedPage -> - export type ContentPageLink = Typename< { uid: string @@ -58,11 +47,7 @@ export type ContentPageLink = Typename< PageLinkEnum.ContentPage > -export type PageLink = - | CodeDefinedPageLink - | ContentPageLink - | AccountPageLink - | LoyaltyPageLink +export type PageLink = ContentPageLink | AccountPageLink | LoyaltyPageLink export type NavigationItem = { item: {