Merged in feat/SW-1577-activity-card (pull request #2517)
feat(SW-1577): activity card: add linking to collection page * feat(SW-1577): add linking to collection page Approved-by: Erik Tiekstra
This commit is contained in:
@@ -4,7 +4,12 @@ import { removeMultipleSlashes } from "@scandic-hotels/common/utils/url"
|
||||
|
||||
import { HotelPageEnum } from "../../../../types/hotelPageEnum"
|
||||
import { tempImageVaultAssetSchema } from "../imageVault"
|
||||
import { contentPageRefSchema, contentPageSchema } from "../pageLinks"
|
||||
import {
|
||||
collectionPageRefSchema,
|
||||
collectionPageSchema,
|
||||
contentPageRefSchema,
|
||||
contentPageSchema,
|
||||
} from "../pageLinks"
|
||||
|
||||
export const activitiesCardSchema = z.object({
|
||||
typename: z
|
||||
@@ -29,6 +34,11 @@ export const activitiesCardSchema = z.object({
|
||||
preamble: z.string(),
|
||||
}),
|
||||
}),
|
||||
collectionPageSchema.extend({
|
||||
header: z.object({
|
||||
preamble: z.string(),
|
||||
}),
|
||||
}),
|
||||
]),
|
||||
})
|
||||
),
|
||||
@@ -67,7 +77,10 @@ export const activitiesCardRefSchema = z.object({
|
||||
hotel_page_activities_content_pageConnection: z.object({
|
||||
edges: z.array(
|
||||
z.object({
|
||||
node: z.discriminatedUnion("__typename", [contentPageRefSchema]),
|
||||
node: z.discriminatedUnion("__typename", [
|
||||
contentPageRefSchema,
|
||||
collectionPageRefSchema,
|
||||
]),
|
||||
})
|
||||
),
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user