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