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:
Matilda Landström
2025-10-02 06:34:46 +00:00
parent 8498026189
commit ea130ffaf8
3 changed files with 15 additions and 7 deletions

View File

@@ -285,7 +285,7 @@ fragment Content_DestinationFilterBlocksRefs on DestinationFilterBlocksContent {
}
}
fragment Content_PromoCampaign on PromoCampaignPageBlocksContent {
fragment Content_PromoCampaignPage on PromoCampaignPageBlocksContent {
content {
content {
embedded_itemsConnection {
@@ -297,6 +297,9 @@ fragment Content_PromoCampaign on PromoCampaignPageBlocksContent {
...CampaignPageLink
...CollectionPageLink
...ContentPageLink
...DestinationCityPageLink
...DestinationCountryPageLink
...DestinationOverviewPageLink
...HotelPageLink
...LoyaltyPageLink
...StartPageLink
@@ -308,7 +311,7 @@ fragment Content_PromoCampaign on PromoCampaignPageBlocksContent {
}
}
fragment Content_PromoCampaignRefs on PromoCampaignPageBlocksContent {
fragment Content_PromoCampaignPageRefs on PromoCampaignPageBlocksContent {
content {
content {
embedded_itemsConnection {
@@ -320,6 +323,9 @@ fragment Content_PromoCampaignRefs on PromoCampaignPageBlocksContent {
...CampaignPageRef
...CollectionPageRef
...ContentPageRef
...DestinationCityPageRef
...DestinationCountryPageRef
...DestinationOverviewPageRef
...HotelPageRef
...LoyaltyPageRef
...StartPageRef

View File

@@ -24,6 +24,7 @@ query GetPromoCampaignPage($locale: String!, $uid: String!) {
blocks {
__typename
...Accordion_PromoCampaignPage
...Content_PromoCampaignPage
}
system {
...System
@@ -41,6 +42,7 @@ query GetPromoCampaignPageRefs($locale: String!, $uid: String!) {
blocks {
__typename
...Accordion_PromoCampaignPageRefs
...Content_PromoCampaignPageRefs
}
system {
...System

View File

@@ -11,7 +11,7 @@ import {
accordionSchema,
} from "../schemas/blocks/accordion"
import {
//contentRefsSchema as blockContentRefsSchema,
contentRefsSchema as blockContentRefsSchema,
contentSchema as blockContentSchema,
} from "../schemas/blocks/content"
import { systemSchema } from "../schemas/system"
@@ -30,7 +30,7 @@ export const promoCampaignPageAccordion = z
export const blocksSchema = z.discriminatedUnion("__typename", [
promoCampaignPageAccordion,
//promoCampaignPageContent,
promoCampaignPageContent,
])
export const CAMPAIGN_TYPES = {
@@ -98,11 +98,11 @@ export const promoCampaignPageSchema = z
})
/** REFS */
/*const promoCampaignPageBlockContentRefs = z
const promoCampaignPageBlockContentRefs = z
.object({
__typename: z.literal(PromoCampaignPageEnum.ContentStack.blocks.Content),
})
.merge(blockContentRefsSchema)*/
.merge(blockContentRefsSchema)
const promoCampaignPageAccordionRefs = z
.object({
@@ -112,7 +112,7 @@ const promoCampaignPageAccordionRefs = z
const promoCampaignPageBlockRefsItem = z.discriminatedUnion("__typename", [
promoCampaignPageAccordionRefs,
//promoCampaignPageBlockContentRefs,
promoCampaignPageBlockContentRefs,
])
export const promoCampaignPageRefsSchema = z.object({