Merged in feat/LOY-362-content-block (pull request #2897)
feat(LOY-362): fix content block * feat(LOY-362): fix content block Approved-by: Chuma Mcphoy (We Ahead)
This commit is contained in:
@@ -285,7 +285,7 @@ fragment Content_DestinationFilterBlocksRefs on DestinationFilterBlocksContent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment Content_PromoCampaign on PromoCampaignPageBlocksContent {
|
fragment Content_PromoCampaignPage on PromoCampaignPageBlocksContent {
|
||||||
content {
|
content {
|
||||||
content {
|
content {
|
||||||
embedded_itemsConnection {
|
embedded_itemsConnection {
|
||||||
@@ -297,6 +297,9 @@ fragment Content_PromoCampaign on PromoCampaignPageBlocksContent {
|
|||||||
...CampaignPageLink
|
...CampaignPageLink
|
||||||
...CollectionPageLink
|
...CollectionPageLink
|
||||||
...ContentPageLink
|
...ContentPageLink
|
||||||
|
...DestinationCityPageLink
|
||||||
|
...DestinationCountryPageLink
|
||||||
|
...DestinationOverviewPageLink
|
||||||
...HotelPageLink
|
...HotelPageLink
|
||||||
...LoyaltyPageLink
|
...LoyaltyPageLink
|
||||||
...StartPageLink
|
...StartPageLink
|
||||||
@@ -308,7 +311,7 @@ fragment Content_PromoCampaign on PromoCampaignPageBlocksContent {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fragment Content_PromoCampaignRefs on PromoCampaignPageBlocksContent {
|
fragment Content_PromoCampaignPageRefs on PromoCampaignPageBlocksContent {
|
||||||
content {
|
content {
|
||||||
content {
|
content {
|
||||||
embedded_itemsConnection {
|
embedded_itemsConnection {
|
||||||
@@ -320,6 +323,9 @@ fragment Content_PromoCampaignRefs on PromoCampaignPageBlocksContent {
|
|||||||
...CampaignPageRef
|
...CampaignPageRef
|
||||||
...CollectionPageRef
|
...CollectionPageRef
|
||||||
...ContentPageRef
|
...ContentPageRef
|
||||||
|
...DestinationCityPageRef
|
||||||
|
...DestinationCountryPageRef
|
||||||
|
...DestinationOverviewPageRef
|
||||||
...HotelPageRef
|
...HotelPageRef
|
||||||
...LoyaltyPageRef
|
...LoyaltyPageRef
|
||||||
...StartPageRef
|
...StartPageRef
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ query GetPromoCampaignPage($locale: String!, $uid: String!) {
|
|||||||
blocks {
|
blocks {
|
||||||
__typename
|
__typename
|
||||||
...Accordion_PromoCampaignPage
|
...Accordion_PromoCampaignPage
|
||||||
|
...Content_PromoCampaignPage
|
||||||
}
|
}
|
||||||
system {
|
system {
|
||||||
...System
|
...System
|
||||||
@@ -41,6 +42,7 @@ query GetPromoCampaignPageRefs($locale: String!, $uid: String!) {
|
|||||||
blocks {
|
blocks {
|
||||||
__typename
|
__typename
|
||||||
...Accordion_PromoCampaignPageRefs
|
...Accordion_PromoCampaignPageRefs
|
||||||
|
...Content_PromoCampaignPageRefs
|
||||||
}
|
}
|
||||||
system {
|
system {
|
||||||
...System
|
...System
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
accordionSchema,
|
accordionSchema,
|
||||||
} from "../schemas/blocks/accordion"
|
} from "../schemas/blocks/accordion"
|
||||||
import {
|
import {
|
||||||
//contentRefsSchema as blockContentRefsSchema,
|
contentRefsSchema as blockContentRefsSchema,
|
||||||
contentSchema as blockContentSchema,
|
contentSchema as blockContentSchema,
|
||||||
} from "../schemas/blocks/content"
|
} from "../schemas/blocks/content"
|
||||||
import { systemSchema } from "../schemas/system"
|
import { systemSchema } from "../schemas/system"
|
||||||
@@ -30,7 +30,7 @@ export const promoCampaignPageAccordion = z
|
|||||||
|
|
||||||
export const blocksSchema = z.discriminatedUnion("__typename", [
|
export const blocksSchema = z.discriminatedUnion("__typename", [
|
||||||
promoCampaignPageAccordion,
|
promoCampaignPageAccordion,
|
||||||
//promoCampaignPageContent,
|
promoCampaignPageContent,
|
||||||
])
|
])
|
||||||
|
|
||||||
export const CAMPAIGN_TYPES = {
|
export const CAMPAIGN_TYPES = {
|
||||||
@@ -98,11 +98,11 @@ export const promoCampaignPageSchema = z
|
|||||||
})
|
})
|
||||||
|
|
||||||
/** REFS */
|
/** REFS */
|
||||||
/*const promoCampaignPageBlockContentRefs = z
|
const promoCampaignPageBlockContentRefs = z
|
||||||
.object({
|
.object({
|
||||||
__typename: z.literal(PromoCampaignPageEnum.ContentStack.blocks.Content),
|
__typename: z.literal(PromoCampaignPageEnum.ContentStack.blocks.Content),
|
||||||
})
|
})
|
||||||
.merge(blockContentRefsSchema)*/
|
.merge(blockContentRefsSchema)
|
||||||
|
|
||||||
const promoCampaignPageAccordionRefs = z
|
const promoCampaignPageAccordionRefs = z
|
||||||
.object({
|
.object({
|
||||||
@@ -112,7 +112,7 @@ const promoCampaignPageAccordionRefs = z
|
|||||||
|
|
||||||
const promoCampaignPageBlockRefsItem = z.discriminatedUnion("__typename", [
|
const promoCampaignPageBlockRefsItem = z.discriminatedUnion("__typename", [
|
||||||
promoCampaignPageAccordionRefs,
|
promoCampaignPageAccordionRefs,
|
||||||
//promoCampaignPageBlockContentRefs,
|
promoCampaignPageBlockContentRefs,
|
||||||
])
|
])
|
||||||
|
|
||||||
export const promoCampaignPageRefsSchema = z.object({
|
export const promoCampaignPageRefsSchema = z.object({
|
||||||
|
|||||||
Reference in New Issue
Block a user