fix: prepare for removing the old breadcrumbs
This commit is contained in:
@@ -6,9 +6,11 @@ fragment LoyaltyPageBreadcrumbs on LoyaltyPage {
|
|||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
... on AccountPage {
|
... on AccountPage {
|
||||||
|
web {
|
||||||
breadcrumbs {
|
breadcrumbs {
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
|
}
|
||||||
system {
|
system {
|
||||||
locale
|
locale
|
||||||
uid
|
uid
|
||||||
|
|||||||
@@ -6,9 +6,11 @@ fragment MyPagesBreadcrumbs on AccountPage {
|
|||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
... on AccountPage {
|
... on AccountPage {
|
||||||
|
web {
|
||||||
breadcrumbs {
|
breadcrumbs {
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
|
}
|
||||||
system {
|
system {
|
||||||
locale
|
locale
|
||||||
uid
|
uid
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ fragment LoyaltyPageBreadcrumbsRefs on LoyaltyPage {
|
|||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
... on AccountPage {
|
... on AccountPage {
|
||||||
|
web {
|
||||||
breadcrumbs {
|
breadcrumbs {
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
|
}
|
||||||
system {
|
system {
|
||||||
...System
|
...System
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,9 +8,11 @@ fragment MyPagesBreadcrumbsRefs on AccountPage {
|
|||||||
edges {
|
edges {
|
||||||
node {
|
node {
|
||||||
... on AccountPage {
|
... on AccountPage {
|
||||||
|
web {
|
||||||
breadcrumbs {
|
breadcrumbs {
|
||||||
title
|
title
|
||||||
}
|
}
|
||||||
|
}
|
||||||
system {
|
system {
|
||||||
...System
|
...System
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export const getBreadcrumbsSchema = z.array(
|
|||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
const breadCrumbsRefsItems = z.object({
|
const breadcrumbsRefsItems = z.object({
|
||||||
items: z.array(
|
items: z.array(
|
||||||
z.object({
|
z.object({
|
||||||
web: z.object({
|
web: z.object({
|
||||||
@@ -38,14 +38,14 @@ const breadCrumbsRefsItems = z.object({
|
|||||||
})
|
})
|
||||||
|
|
||||||
export const validateMyPagesBreadcrumbsRefsContentstackSchema = z.object({
|
export const validateMyPagesBreadcrumbsRefsContentstackSchema = z.object({
|
||||||
all_account_page: breadCrumbsRefsItems,
|
all_account_page: breadcrumbsRefsItems,
|
||||||
})
|
})
|
||||||
|
|
||||||
export const validateLoyaltyPageBreadcrumbsRefsContentstackSchema = z.object({
|
export const validateLoyaltyPageBreadcrumbsRefsContentstackSchema = z.object({
|
||||||
all_loyalty_page: breadCrumbsRefsItems,
|
all_loyalty_page: breadcrumbsRefsItems,
|
||||||
})
|
})
|
||||||
|
|
||||||
const breadCrumbsItems = z.object({
|
const breadcrumbsItems = z.object({
|
||||||
items: z.array(
|
items: z.array(
|
||||||
z.object({
|
z.object({
|
||||||
web: z.object({
|
web: z.object({
|
||||||
@@ -55,9 +55,11 @@ const breadCrumbsItems = z.object({
|
|||||||
edges: z.array(
|
edges: z.array(
|
||||||
z.object({
|
z.object({
|
||||||
node: z.object({
|
node: z.object({
|
||||||
|
web: z.object({
|
||||||
breadcrumbs: z.object({
|
breadcrumbs: z.object({
|
||||||
title: z.string(),
|
title: z.string(),
|
||||||
}),
|
}),
|
||||||
|
}),
|
||||||
system: z.object({
|
system: z.object({
|
||||||
locale: z.nativeEnum(Lang),
|
locale: z.nativeEnum(Lang),
|
||||||
uid: z.string(),
|
uid: z.string(),
|
||||||
@@ -77,9 +79,9 @@ const breadCrumbsItems = z.object({
|
|||||||
})
|
})
|
||||||
|
|
||||||
export const validateMyPagesBreadcrumbsContentstackSchema = z.object({
|
export const validateMyPagesBreadcrumbsContentstackSchema = z.object({
|
||||||
all_account_page: breadCrumbsItems,
|
all_account_page: breadcrumbsItems,
|
||||||
})
|
})
|
||||||
|
|
||||||
export const validateLoyaltyPageBreadcrumbsContentstackSchema = z.object({
|
export const validateLoyaltyPageBreadcrumbsContentstackSchema = z.object({
|
||||||
all_loyalty_page: breadCrumbsItems,
|
all_loyalty_page: breadcrumbsItems,
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ async function getLoyaltyPageBreadcrumbs({ lang, pathname }: fetchBreadcrumbs) {
|
|||||||
href: removeMultipleSlashes(
|
href: removeMultipleSlashes(
|
||||||
`/${breadcrumb.node.system.locale}/${breadcrumb.node.url}`
|
`/${breadcrumb.node.system.locale}/${breadcrumb.node.url}`
|
||||||
),
|
),
|
||||||
title: breadcrumb.node.breadcrumbs.title,
|
title: breadcrumb.node.web.breadcrumbs.title,
|
||||||
uid: breadcrumb.node.system.uid,
|
uid: breadcrumb.node.system.uid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -157,7 +157,7 @@ async function getMyPagesBreadcrumbs({ lang, pathname }: fetchBreadcrumbs) {
|
|||||||
href: removeMultipleSlashes(
|
href: removeMultipleSlashes(
|
||||||
`/${breadcrumb.node.system.locale}/${breadcrumb.node.url}`
|
`/${breadcrumb.node.system.locale}/${breadcrumb.node.url}`
|
||||||
),
|
),
|
||||||
title: breadcrumb.node.breadcrumbs.title,
|
title: breadcrumb.node.web.breadcrumbs.title,
|
||||||
uid: breadcrumb.node.system.uid,
|
uid: breadcrumb.node.system.uid,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import { BlocksTypenameEnum } from "./utils/typename"
|
|||||||
|
|
||||||
import type { Contact } from "./asides/contact"
|
import type { Contact } from "./asides/contact"
|
||||||
import type { PuffAside } from "./asides/puff"
|
import type { PuffAside } from "./asides/puff"
|
||||||
import type { Hero } from "./hero"
|
|
||||||
import type { List } from "./blocks/list"
|
import type { List } from "./blocks/list"
|
||||||
import type { PuffBlock } from "./blocks/puff"
|
import type { PuffBlock } from "./blocks/puff"
|
||||||
import type { Preamble } from "./preamble"
|
|
||||||
import type { Text } from "./blocks/text"
|
import type { Text } from "./blocks/text"
|
||||||
|
import type { Hero } from "./hero"
|
||||||
|
import type { Preamble } from "./preamble"
|
||||||
import type { AllRequestResponseWithTotal } from "./utils/all"
|
import type { AllRequestResponseWithTotal } from "./utils/all"
|
||||||
import type { AsideTypenameEnum, Typename } from "./utils/typename"
|
import type { AsideTypenameEnum, Typename } from "./utils/typename"
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ interface MyPagesBreadcrumbs {
|
|||||||
breadcrumbs: {
|
breadcrumbs: {
|
||||||
title: string
|
title: string
|
||||||
parentsConnection: Edges<{
|
parentsConnection: Edges<{
|
||||||
|
web: {
|
||||||
breadcrumbs: {
|
breadcrumbs: {
|
||||||
title: string
|
title: string
|
||||||
}
|
}
|
||||||
@@ -16,6 +17,7 @@ interface MyPagesBreadcrumbs {
|
|||||||
locale: Lang
|
locale: Lang
|
||||||
uid: string
|
uid: string
|
||||||
}
|
}
|
||||||
|
}
|
||||||
url: string
|
url: string
|
||||||
}>
|
}>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user