feat(SW-3121): Added support for campaign text inside the hero of campaign pages
* fix: making sure the cacheKey for getHotelsByHotelIds is not sorting the original array Approved-by: Matilda Landström
This commit is contained in:
@@ -68,7 +68,25 @@ export const heroSchema = z.object({
|
||||
bold_text: z.string().nullish(),
|
||||
text: z.string().nullish(),
|
||||
})
|
||||
.nullish(),
|
||||
.nullish()
|
||||
.transform((data) => {
|
||||
if (data?.bold_text || data?.text) {
|
||||
return data
|
||||
}
|
||||
return null
|
||||
}),
|
||||
campaign_text: z
|
||||
.object({
|
||||
text: z.string().nullish(),
|
||||
bold_text: z.string().nullish(),
|
||||
})
|
||||
.nullish()
|
||||
.transform((data) => {
|
||||
if (data?.bold_text || data?.text) {
|
||||
return data
|
||||
}
|
||||
return null
|
||||
}),
|
||||
button: z
|
||||
.intersection(z.object({ cta: z.string() }), linkConnectionSchema)
|
||||
.transform((data) => {
|
||||
|
||||
Reference in New Issue
Block a user