fix(SW-1111) refactor state of active hotel card and hotel pin

This commit is contained in:
Pontus Dreij
2024-12-09 16:49:15 +01:00
parent 7f50d34431
commit 15c5afc43a
15 changed files with 108 additions and 115 deletions

View File

@@ -17,11 +17,9 @@ export default function InteractiveMap({
pointsOfInterest,
activePoi,
hotelPins,
activeHotelPin,
mapId,
closeButton,
onActivePoiChange,
onActiveHotelPinChange,
}: InteractiveMapProps) {
const intl = useIntl()
const map = useMap()
@@ -50,13 +48,7 @@ export default function InteractiveMap({
return (
<div className={styles.mapContainer}>
<Map {...mapOptions}>
{hotelPins && (
<HotelListingMapContent
activeHotelPin={activeHotelPin}
hotelPins={hotelPins}
onActiveHotelPinChange={onActiveHotelPinChange}
/>
)}
{hotelPins && <HotelListingMapContent hotelPins={hotelPins} />}
{pointsOfInterest && (
<HotelMapContent
coordinates={coordinates}