feat(SW-302): switch out mock data for facility cards

This commit is contained in:
Matilda Landström
2024-09-17 15:17:15 +02:00
parent 8d5ed30fc4
commit 86dd3c04ed
22 changed files with 289 additions and 16938 deletions

View File

@@ -164,6 +164,16 @@ const detailedFacilitySchema = z.object({
filter: z.string().optional(),
})
const facilitySchema = z.object({
headingText: z.string().optional(), // TODO: Should not be optional, remove when we get meetingsAndConferences headingText
heroImages: z.array(
z.object({
metaData: imageMetaDataSchema,
imageSizes: imageSizesSchema,
})
),
})
const healthFacilitySchema = z.object({
type: z.string(),
content: z.object({
@@ -497,6 +507,9 @@ export const getHotelDataSchema = z.object({
socialMedia: socialMediaSchema,
meta: metaSchema.optional(),
isActive: z.boolean(),
conferencesAndMeetings: facilitySchema.optional(),
healthAndWellness: facilitySchema.optional(),
restaurantImages: facilitySchema.optional(),
}),
relationships: relationshipsSchema,
}),
@@ -778,3 +791,4 @@ export const apiLocationsSchema = z.object({
})
),
})
export type Facility = z.infer<typeof facilitySchema> & { id: string }