Merged in fix/SW-1111-issues-with-map-select-hotel (pull request #1057)

Fix/SW-1111 issues with map select hotel

Approved-by: Bianca Widstam
This commit is contained in:
Pontus Dreij
2024-12-10 12:40:13 +00:00
37 changed files with 508 additions and 260 deletions

View File

@@ -11,9 +11,7 @@ export interface InteractiveMapProps {
pointsOfInterest?: PointOfInterest[]
activePoi?: PointOfInterest["name"] | null
hotelPins?: HotelPin[]
activeHotelPin?: HotelPin["name"] | null
mapId: string
closeButton: ReactElement
onActivePoiChange?: (poi: PointOfInterest["name"] | null) => void
onActiveHotelPinChange?: (hotelPin: HotelPin["name"] | null) => void
}

View File

@@ -10,8 +10,6 @@ export enum HotelCardListingTypeEnum {
export type HotelCardListingProps = {
hotelData: HotelData[]
type?: HotelCardListingTypeEnum
activeCard?: string | null
onHotelCardHover?: (hotelName: string | null) => void
}
export type HotelData = {

View File

@@ -7,5 +7,4 @@ export type HotelCardProps = {
hotel: HotelData
type?: HotelCardListingTypeEnum
state?: "default" | "active"
onHotelCardHover?: (hotelName: string | null) => void
}

View File

@@ -7,13 +7,13 @@ import {
import { HotelData } from "./hotelCardListingProps"
import { CategorizedFilters, Filter } from "./hotelFilters"
import { SelectHotelSearchParams } from "./selectHotelSearchParams"
import type { Coordinates } from "@/types/components/maps/coordinates"
import type { Location } from "@/types/trpc/routers/hotel/locations"
export interface HotelListingProps {
hotels: HotelData[]
activeHotelPin?: string | null
setActiveHotelPin: (hotelName: string | null) => void
}
export interface SelectHotelMapProps {
@@ -41,12 +41,11 @@ export type HotelPin = {
amenities: Filter[]
ratings: number | null
operaId: string
facilityIds: number[]
}
export interface HotelListingMapContentProps {
activeHotelPin?: HotelPin["name"] | null
hotelPins: HotelPin[]
onActiveHotelPinChange?: (pinName: string | null) => void
}
export interface HotelCardDialogProps {
@@ -57,6 +56,11 @@ export interface HotelCardDialogProps {
export interface HotelCardDialogListingProps {
hotels: HotelData[] | null
activeCard: string | null | undefined
onActiveCardChange: (hotelName: string | null) => void
}
export type SelectHotelMapContainerProps = {
city: Location
searchParams: SelectHotelSearchParams
adultsInRoom: number
childrenInRoom: string | undefined
}