feat(SW-340): Added HotelCardDialog component

This commit is contained in:
Pontus Dreij
2024-11-07 16:07:54 +01:00
parent 7a49d4a393
commit 2748120890
19 changed files with 309 additions and 41 deletions

View File

@@ -2,9 +2,14 @@ import { HotelsAvailabilityPrices } from "@/server/routers/hotels/output"
import { Hotel } from "@/types/hotel"
export enum HotelCardListingType {
MapListing = "mapListing",
PageListing = "pageListing",
}
export type HotelCardListingProps = {
hotelData: HotelData[]
type?: "map" | "listing"
type?: HotelCardListingType
}
export type HotelData = {

View File

@@ -1,6 +1,6 @@
import { HotelData } from "./hotelCardListingProps"
import { HotelCardListingType, HotelData } from "./hotelCardListingProps"
export type HotelCardProps = {
hotel: HotelData
type?: "map" | "listing"
type?: HotelCardListingType
}

View File

@@ -1,4 +1,12 @@
import { z } from "zod"
import {
imageMetaDataSchema,
imageSizesSchema,
} from "@/server/routers/hotels/schemas/image"
import { HotelData } from "./hotelCardListingProps"
import { Filter } from "./hotelFilters"
import type { Coordinates } from "@/types/components/maps/coordinates"
@@ -18,10 +26,19 @@ export interface SelectHotelMapProps {
hotels: HotelData[]
}
type ImageSizes = z.infer<typeof imageSizesSchema>
type ImageMetaData = z.infer<typeof imageMetaDataSchema>
export type HotelPin = {
name: string
coordinates: Coordinates
price: string
currency: string
image: string
publicPrice: string | null
memberPrice: string | null
currency: string | null
images: {
imageSizes: ImageSizes
metaData: ImageMetaData
}[]
amenities: Filter[]
ratings: number | null
}