refactor: change name on breadcrumbs unique id for loyalty page
This commit is contained in:
@@ -73,7 +73,7 @@ export const validateBreadcrumbsRefsContenstackSchemaLoyalty = z.object({
|
||||
items: z.array(
|
||||
z.object({
|
||||
web: z.object({
|
||||
breadcrumbss: z.object({
|
||||
breadcrumbs: z.object({
|
||||
parentsConnection: z.object({
|
||||
edges: z.array(
|
||||
z.object({
|
||||
@@ -102,7 +102,7 @@ export const validateBreadcrumbsContenstackSchemaLoyalty = z.object({
|
||||
items: z.array(
|
||||
z.object({
|
||||
web: z.object({
|
||||
breadcrumbss: z.object({
|
||||
breadcrumbs: z.object({
|
||||
title: z.string(),
|
||||
parentsConnection: z.object({
|
||||
edges: z.array(
|
||||
|
||||
@@ -163,7 +163,7 @@ export const breadcrumbsQueryRouter = router({
|
||||
}
|
||||
|
||||
const parentBreadcrumbs =
|
||||
validatedBreadcrumbsData.data.all_loyalty_page.items[0].web.breadcrumbss.parentsConnection.edges.map(
|
||||
validatedBreadcrumbsData.data.all_loyalty_page.items[0].web.breadcrumbs.parentsConnection.edges.map(
|
||||
(breadcrumb) => {
|
||||
return {
|
||||
href: removeMultipleSlashes(
|
||||
@@ -178,7 +178,7 @@ export const breadcrumbsQueryRouter = router({
|
||||
const pageBreadcrumb =
|
||||
validatedBreadcrumbsData.data.all_loyalty_page.items.map((breadcrumb) => {
|
||||
return {
|
||||
title: breadcrumb.web.breadcrumbss.title,
|
||||
title: breadcrumb.web.breadcrumbs.title,
|
||||
uid: breadcrumb.system.uid,
|
||||
}
|
||||
})
|
||||
|
||||
@@ -22,9 +22,7 @@ export function getConnectionsLoyalty(refs: GetLoyaltyPageBreadcrumbsRefsData) {
|
||||
const connections: Edges<NodeRefs>[] = []
|
||||
refs.all_loyalty_page.items.forEach((ref) => {
|
||||
console.log(ref)
|
||||
console.log(ref.web.breadcrumbss)
|
||||
console.log(ref.web.breadcrumbss.parentsConnection)
|
||||
connections.push(ref.web.breadcrumbss.parentsConnection)
|
||||
connections.push(ref.web.breadcrumbs.parentsConnection)
|
||||
})
|
||||
console.log(connections)
|
||||
return connections
|
||||
|
||||
Reference in New Issue
Block a user