-
{frontpageLinkText}
-
+
{/* -
@@ -26,12 +25,12 @@ export default function TopMenu({ frontpageLinkText, homeHref, links }: TopMenuP
*/}
{links.map(({ link }) => (
-
-
{link.title}
-
+
))}
diff --git a/components/Current/Preamble/Breadcrumbs/index.tsx b/components/Current/Preamble/Breadcrumbs/index.tsx
index 2d629d75e..0fbb477c2 100644
--- a/components/Current/Preamble/Breadcrumbs/index.tsx
+++ b/components/Current/Preamble/Breadcrumbs/index.tsx
@@ -1,5 +1,3 @@
-import Link from "next/link"
-
import styles from "./breadcrumbs.module.css"
import type { BreadcrumbsProps } from "@/types/components/current/breadcrumbs"
@@ -14,20 +12,20 @@ export default function Breadcrumbs({
{parent ? (
-
-
- {parent.node.breadcrumbs?.title ?? parent.node.title}
-
+
+ {parent.title}
+
) : null}
- {breadcrumbs.edges.map((breadcrumb) => (
+ {breadcrumbs.map((breadcrumb) => (
-
-
- {breadcrumb.node.breadcrumbs?.title ?? breadcrumb.node.title}
-
+
+ {breadcrumb.title}
+
))}
-
diff --git a/components/Current/SubnavMobile.tsx b/components/Current/SubnavMobile.tsx
index c9d7a508b..04eea5fd9 100644
--- a/components/Current/SubnavMobile.tsx
+++ b/components/Current/SubnavMobile.tsx
@@ -1,5 +1,3 @@
-import Link from "next/link"
-
import type { SubnavMobileProps } from "@/types/components/current/subnavMobile"
export default async function SubnavMobile({
@@ -13,16 +11,16 @@ export default async function SubnavMobile({
{parent ? (
-
-
- {parent.node.breadcrumbs?.title ?? parent.node.title}
-
+
+ {parent.title}
+
) : null}
- {breadcrumbs.edges.map((breadcrumb) => (
- -
-
- {breadcrumb.node.breadcrumbs?.title ?? breadcrumb.node.title}
-
+ {breadcrumbs.map((breadcrumb) => (
+
-
+
+ {breadcrumb.title}
+
))}
-
diff --git a/lib/graphql/Fragments/Aside/Puff.graphql b/lib/graphql/Fragments/Aside/Puff.graphql
index 1cdc63204..1ed6ba3ca 100644
--- a/lib/graphql/Fragments/Aside/Puff.graphql
+++ b/lib/graphql/Fragments/Aside/Puff.graphql
@@ -2,13 +2,6 @@
fragment PuffAside on CurrentBlocksPageAsidePuff {
puff {
- puffConnection {
- totalCount
- edges {
- node {
- ...Puff
- }
- }
- }
+ ...Puff
}
}
diff --git a/lib/graphql/Fragments/Blocks/List.graphql b/lib/graphql/Fragments/Blocks/List.graphql
index 749416bef..17720ffea 100644
--- a/lib/graphql/Fragments/Blocks/List.graphql
+++ b/lib/graphql/Fragments/Blocks/List.graphql
@@ -1,5 +1,3 @@
-#import "../PageLinks.graphql"
-
fragment ListItem on CurrentBlocksPageBlocksListBlockListItemsListItem {
list_item {
list_item_style
@@ -19,30 +17,12 @@ fragment ListItemExternalLink on CurrentBlocksPageBlocksListBlockListItemsListIt
}
}
-fragment ListItemInternalLink on CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink {
- list_item_internal_link {
- link_text
- list_item_style
- subtitle
- pageConnection {
- totalCount
- edges {
- node {
- __typename
- ...CurrentBlocksPageLink
- }
- }
- }
- }
-}
-
fragment ListBlock on CurrentBlocksPageBlocksList {
list {
list_items {
__typename
...ListItem
...ListItemExternalLink
- ...ListItemInternalLink
}
title
}
diff --git a/lib/graphql/Fragments/Blocks/Puff.graphql b/lib/graphql/Fragments/Blocks/Puff.graphql
index 4c125bceb..f42cf99e0 100644
--- a/lib/graphql/Fragments/Blocks/Puff.graphql
+++ b/lib/graphql/Fragments/Blocks/Puff.graphql
@@ -2,11 +2,9 @@
fragment PuffBlock on CurrentBlocksPageBlocksPuffs {
puffs {
- # We have to manually add a limit since Contentstack handles its complexity calculation in a certain way
- puffsConnection(limit: 9) {
- totalCount
- edges {
- node {
+ puffs {
+ ... on CurrentBlocksPageBlocksPuffsBlockPuffsPuff {
+ puff {
...Puff
}
}
diff --git a/lib/graphql/Fragments/Blocks/Text.graphql b/lib/graphql/Fragments/Blocks/Text.graphql
index 3ee6173a8..25e39b0cb 100644
--- a/lib/graphql/Fragments/Blocks/Text.graphql
+++ b/lib/graphql/Fragments/Blocks/Text.graphql
@@ -1,5 +1,4 @@
#import "../Image.graphql"
-#import "../PageLinks.graphql"
fragment TextBlock on CurrentBlocksPageBlocksText {
text {
@@ -9,7 +8,6 @@ fragment TextBlock on CurrentBlocksPageBlocksText {
edges {
node {
__typename
- ...CurrentBlocksPageLink
...Image
}
}
diff --git a/lib/graphql/Fragments/Breadcrumbs.graphql b/lib/graphql/Fragments/Breadcrumbs.graphql
index f8ebafec2..585ecbf40 100644
--- a/lib/graphql/Fragments/Breadcrumbs.graphql
+++ b/lib/graphql/Fragments/Breadcrumbs.graphql
@@ -1,19 +1,9 @@
-#import "./PageLinks.graphql"
-
fragment Breadcrumbs on CurrentBlocksPage {
breadcrumbs {
- title
- parentsConnection {
- edges {
- node {
- ... on CurrentBlocksPage {
- breadcrumbs {
- title
- }
- ...CurrentBlocksPageLink
- }
- }
- }
+ parents {
+ href
+ title
}
+ title
}
}
diff --git a/lib/graphql/Fragments/Hero.graphql b/lib/graphql/Fragments/Hero.graphql
index a96351a54..a232e4bc0 100644
--- a/lib/graphql/Fragments/Hero.graphql
+++ b/lib/graphql/Fragments/Hero.graphql
@@ -1,5 +1,4 @@
#import "./Image.graphql"
-#import "./PageLinks.graphql"
fragment Hero on Hero {
imagesConnection {
diff --git a/lib/graphql/Fragments/Preamble.graphql b/lib/graphql/Fragments/Preamble.graphql
index dd6424608..a02586296 100644
--- a/lib/graphql/Fragments/Preamble.graphql
+++ b/lib/graphql/Fragments/Preamble.graphql
@@ -1,5 +1,4 @@
#import "./Image.graphql"
-#import "./PageLinks.graphql"
fragment Preamble on CurrentBlocksPage {
preamble {
@@ -9,7 +8,6 @@ fragment Preamble on CurrentBlocksPage {
edges {
node {
__typename
- ...CurrentBlocksPageLink
...Image
}
}
diff --git a/lib/graphql/Fragments/Puff.graphql b/lib/graphql/Fragments/Puff.graphql
index d99f25346..e63c3a16d 100644
--- a/lib/graphql/Fragments/Puff.graphql
+++ b/lib/graphql/Fragments/Puff.graphql
@@ -1,5 +1,4 @@
#import "./Image.graphql"
-#import "./PageLinks.graphql"
fragment Puff on Puff {
imageConnection {
@@ -9,33 +8,12 @@ fragment Puff on Puff {
}
}
}
- is_internal
link {
href
title
}
- pageConnection {
- edges {
- node {
- __typename
- ...CurrentBlocksPageLink
- }
- }
- }
- system {
- uid
- }
text {
json
- embedded_itemsConnection {
- totalCount
- edges {
- node {
- __typename
- ...Image
- }
- }
- }
}
title
}
diff --git a/lib/graphql/Query/CurrentBlockPage.graphql b/lib/graphql/Query/CurrentBlockPage.graphql
index 8eebebb7a..0a5315f78 100644
--- a/lib/graphql/Query/CurrentBlockPage.graphql
+++ b/lib/graphql/Query/CurrentBlockPage.graphql
@@ -27,13 +27,13 @@ query GetCurrentBlockPage($locale: String!, $url: String!) {
...Hero
}
...Preamble
- title
- url
system {
- uid
created_at
+ uid
updated_at
}
+ title
+ url
}
total
}
diff --git a/types/components/current/breadcrumbs.ts b/types/components/current/breadcrumbs.ts
index 8e951f571..5c1749758 100644
--- a/types/components/current/breadcrumbs.ts
+++ b/types/components/current/breadcrumbs.ts
@@ -1,8 +1,7 @@
import type { Breadcrumb } from "@/types/requests/currentBlockPage"
-import type { Edges, Node } from "@/types/requests/utils/edges"
export type BreadcrumbsProps = {
- breadcrumbs: Edges
- parent?: Node
+ breadcrumbs: Breadcrumb[]
+ parent?: Breadcrumb
title: string
}
diff --git a/types/components/current/subnavMobile.ts b/types/components/current/subnavMobile.ts
index 34a8718df..3c074f06b 100644
--- a/types/components/current/subnavMobile.ts
+++ b/types/components/current/subnavMobile.ts
@@ -1,8 +1,7 @@
import type { Breadcrumb } from "@/types/requests/currentBlockPage"
-import type { Edges, Node } from "@/types/requests/utils/edges"
export type SubnavMobileProps = {
- breadcrumbs: Edges
- parent?: Node
+ breadcrumbs: Breadcrumb[]
+ parent?: Breadcrumb
title: string
}
diff --git a/types/requests/asides/puff.ts b/types/requests/asides/puff.ts
index 3068d98f9..b1930aa6f 100644
--- a/types/requests/asides/puff.ts
+++ b/types/requests/asides/puff.ts
@@ -1,8 +1,5 @@
import type { Puff } from "../puff"
-import type { Edges } from "../utils/edges"
export type PuffAside = {
- puff: {
- puffConnection: Edges
- }
+ puff: Puff
}
diff --git a/types/requests/blocks/list.ts b/types/requests/blocks/list.ts
index d48812b10..0c102e64b 100644
--- a/types/requests/blocks/list.ts
+++ b/types/requests/blocks/list.ts
@@ -1,5 +1,3 @@
-import type { Edges } from "../utils/edges"
-import type { PageLink } from "../utils/pageLink"
import type { Typename } from "../utils/typename"
enum ListItemStyleEnum {
@@ -12,7 +10,6 @@ type ListItemStyle = keyof typeof ListItemStyleEnum
export enum BlockListItemsEnum {
CurrentBlocksPageBlocksListBlockListItemsListItem = "CurrentBlocksPageBlocksListBlockListItemsListItem",
CurrentBlocksPageBlocksListBlockListItemsListItemExternalLink = "CurrentBlocksPageBlocksListBlockListItemsListItemExternalLink",
- CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink = "CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink",
}
type ExternalLinkListItem = Typename<
@@ -29,18 +26,6 @@ type ExternalLinkListItem = Typename<
BlockListItemsEnum.CurrentBlocksPageBlocksListBlockListItemsListItemExternalLink
>
-type InternalLinkListItem = Typename<
- {
- list_item_internal_link: {
- link_text?: string
- list_item_style: ListItemStyle
- subtitle?: string
- pageConnection: Edges
- }
- },
- BlockListItemsEnum.CurrentBlocksPageBlocksListBlockListItemsListItemInternalLink
->
-
type RegularListItem = Typename<
{
list_item: {
@@ -54,7 +39,6 @@ type RegularListItem = Typename<
export type ListItem =
| ExternalLinkListItem
- | InternalLinkListItem
| RegularListItem
export type List = {
diff --git a/types/requests/blocks/puff.ts b/types/requests/blocks/puff.ts
index 7188bea57..912050393 100644
--- a/types/requests/blocks/puff.ts
+++ b/types/requests/blocks/puff.ts
@@ -1,8 +1,9 @@
-import type { Edges } from "../utils/edges"
import type { Puff } from "../puff"
export type PuffBlock = {
puffs: {
- puffsConnection: Edges
+ puffs: {
+ puff: Puff
+ }[]
}
}
diff --git a/types/requests/currentBlockPage.ts b/types/requests/currentBlockPage.ts
index 88daa6f0a..3611485a6 100644
--- a/types/requests/currentBlockPage.ts
+++ b/types/requests/currentBlockPage.ts
@@ -13,8 +13,6 @@ import type {
Typename,
PagesTypenameEnum,
} from "./utils/typename"
-import type { EmbedEnum } from "./utils/embeds"
-import type { Edges } from "./utils/edges"
export type Asides =
| Typename
@@ -25,26 +23,13 @@ export type Blocks =
| Typename
| Typename
-interface SharedBreadcrumb {
- breadcrumbs: {
- title?: string
- } | null
- system: {
- locale: string
- uid: string
- }
+export type Breadcrumb = {
+ href: string
title: string
- url: string
}
-export interface CurrentBlocksPageBreadcrumb extends SharedBreadcrumb {
- __typename: EmbedEnum.CurrentBlocksPage
-}
-
-export type Breadcrumb = CurrentBlocksPageBreadcrumb
-
export type Breadcrumbs = {
- parentsConnection: Edges
+ parents: Breadcrumb[]
title: string
}
@@ -55,13 +40,13 @@ export type BlockPage = {
breadcrumbs: Breadcrumbs
hero: Hero
preamble: Preamble
- title: string
- url: string
system: {
- uid: string
created_at: string
+ uid: string
updated_at: string
}
+ title: string
+ url: string
}
export type GetCurrentBlockPageData = {
diff --git a/types/requests/embeds.ts b/types/requests/embeds.ts
index 77d4dc5d3..11e863fd5 100644
--- a/types/requests/embeds.ts
+++ b/types/requests/embeds.ts
@@ -1,4 +1,3 @@
import type { SysAsset } from "./utils/asset"
-import type { PageLinkType } from "./utils/pageLink"
-export type Embeds = PageLinkType | SysAsset
+export type Embeds = SysAsset
diff --git a/types/requests/header.ts b/types/requests/header.ts
index 242687213..9be3a100a 100644
--- a/types/requests/header.ts
+++ b/types/requests/header.ts
@@ -2,10 +2,8 @@ import type { Edges } from "./utils/edges"
import type { Image } from "../image"
export type HeaderLink = {
- link: {
- href: string
- title: string
- }
+ href: string
+ title: string
}
export type TopMenuHeaderLink = {
diff --git a/types/requests/puff.ts b/types/requests/puff.ts
index 38ab627d0..48a89d5e0 100644
--- a/types/requests/puff.ts
+++ b/types/requests/puff.ts
@@ -1,22 +1,14 @@
import type { Image } from "../image"
import type { Edges } from "./utils/edges"
-import type { Embeds } from "./embeds"
-import type { PageLink } from "./utils/pageLink"
import type { RTEDocument } from "../rte/node"
export type Puff = {
imageConnection: Edges
- is_internal: boolean
link: {
href: string
title: string
}
- pageConnection: Edges
- system: {
- uid: string
- }
text: {
- embedded_itemsConnection: Edges
json: RTEDocument
}
title: string
diff --git a/types/requests/utils/typename.ts b/types/requests/utils/typename.ts
index 2e9aaf74f..6781408c7 100644
--- a/types/requests/utils/typename.ts
+++ b/types/requests/utils/typename.ts
@@ -7,7 +7,6 @@ export type AsideTypename = keyof typeof AsideTypenameEnum
export enum BlocksTypenameEnum {
CurrentBlocksPageBlocksList = "CurrentBlocksPageBlocksList",
- CurrentBlocksPageBlocksPreamble = "CurrentBlocksPageBlocksPreamble",
CurrentBlocksPageBlocksPuffs = "CurrentBlocksPageBlocksPuffs",
CurrentBlocksPageBlocksText = "CurrentBlocksPageBlocksText",
}