diff --git a/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx b/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx index 4208d4871..7820d72b9 100644 --- a/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx +++ b/components/HotelReservation/SelectHotel/SelectHotelMap/index.tsx @@ -83,7 +83,12 @@ export default function SelectHotelMap({ } function handlePageRedirect() { - router.push(`${selectHotel(lang)}?${searchParams.toString()}`) + const newUrl = `${selectHotel(lang)}?${searchParams.toString()}` + if (window.history.length > 1) { + router.back() + } else { + router.push(newUrl) + } } const closeButton = ( diff --git a/components/Maps/InteractiveMap/HotelListingMapContent/index.tsx b/components/Maps/InteractiveMap/HotelListingMapContent/index.tsx index 9f4c189c0..39498c3b3 100644 --- a/components/Maps/InteractiveMap/HotelListingMapContent/index.tsx +++ b/components/Maps/InteractiveMap/HotelListingMapContent/index.tsx @@ -100,4 +100,4 @@ function HotelListingMapContent({ ) } -export default memo(HotelListingMapContent) +export default HotelListingMapContent