fix(SW-1111) refactor state of active hotel card and hotel pin
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -7,5 +7,4 @@ export type HotelCardProps = {
|
||||
hotel: HotelData
|
||||
type?: HotelCardListingTypeEnum
|
||||
state?: "default" | "active"
|
||||
onHotelCardHover?: (hotelName: string | null) => void
|
||||
}
|
||||
|
||||
@@ -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 { Location } from "@/types/trpc/routers/hotel/locations"
|
||||
|
||||
export interface HotelListingProps {
|
||||
hotels: HotelData[]
|
||||
activeHotelPin?: string | null
|
||||
setActiveHotelPin: (hotelName: string | null) => void
|
||||
}
|
||||
|
||||
export interface SelectHotelMapProps {
|
||||
@@ -45,9 +45,7 @@ export type HotelPin = {
|
||||
}
|
||||
|
||||
export interface HotelListingMapContentProps {
|
||||
activeHotelPin?: HotelPin["name"] | null
|
||||
hotelPins: HotelPin[]
|
||||
onActiveHotelPinChange?: (pinName: string | null) => void
|
||||
}
|
||||
|
||||
export interface HotelCardDialogProps {
|
||||
@@ -58,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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user