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:
@@ -3,6 +3,7 @@
|
||||
|
||||
#import "../../Fragments/AccountPage/Ref.graphql"
|
||||
#import "../../Fragments/CollectionPage/Ref.graphql"
|
||||
#import "../../Fragments/ContentPage/Ref.graphql"
|
||||
|
||||
#import "../../Fragments/Blocks/Accordion.graphql"
|
||||
#import "../../Fragments/Blocks/Refs/Accordion.graphql"
|
||||
@@ -59,6 +60,12 @@ query GetHotelPage($locale: String!, $uid: String!) {
|
||||
preamble
|
||||
}
|
||||
}
|
||||
... on CollectionPage {
|
||||
...CollectionPageLink
|
||||
header {
|
||||
preamble
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,6 +115,7 @@ query GetHotelPageRefs($locale: String!, $uid: String!) {
|
||||
edges {
|
||||
node {
|
||||
__typename
|
||||
...CollectionPageRef
|
||||
...ContentPageRef
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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