fix: align placeholder handling for all hotel images in zod

This commit is contained in:
Christel Westerberg
2024-12-17 10:20:26 +01:00
parent 0c62cb6d96
commit 8328493289
6 changed files with 47 additions and 82 deletions

View File

@@ -2,10 +2,7 @@ import type { z } from "zod"
import type { Coordinates } from "@/types/components/maps/coordinates"
import type { Location } from "@/types/trpc/routers/hotel/locations"
import type {
imageMetaDataSchema,
imageSizesSchema,
} from "@/server/routers/hotels/schemas/image"
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
import type { Child } from "../../bookingWidget/guestsRoomsPicker"
import type { HotelData } from "./hotelCardListingProps"
import type { CategorizedFilters, Filter } from "./hotelFilters"
@@ -24,8 +21,8 @@ export interface SelectHotelMapProps {
cityCoordinates: Coordinates
}
type ImageSizes = z.infer<typeof imageSizesSchema>
type ImageMetaData = z.infer<typeof imageMetaDataSchema>
type ImageSizes = z.infer<typeof imageSchema>["imageSizes"]
type ImageMetaData = z.infer<typeof imageSchema>["metaData"]
export type HotelPin = {
name: string

View File

@@ -1,19 +1,19 @@
import { z } from "zod"
import type { z } from "zod"
import {
import type {
checkinSchema,
facilitySchema,
getHotelDataSchema,
parkingSchema,
pointOfInterestSchema,
} from "@/server/routers/hotels/output"
import { imageSchema } from "@/server/routers/hotels/schemas/image"
import {
import type { imageSchema } from "@/server/routers/hotels/schemas/image"
import type {
restaurantDaySchema,
restaurantOpeningHoursSchema,
restaurantSchema,
} from "@/server/routers/hotels/schemas/restaurants"
import { roomSchema } from "@/server/routers/hotels/schemas/room"
import type { roomSchema } from "@/server/routers/hotels/schemas/room"
export type HotelData = z.output<typeof getHotelDataSchema>