fix(SW-1111): Fix close button on map
This commit is contained in:
@@ -83,7 +83,12 @@ export default function SelectHotelMap({
|
|||||||
}
|
}
|
||||||
|
|
||||||
function handlePageRedirect() {
|
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 = (
|
const closeButton = (
|
||||||
|
|||||||
@@ -100,4 +100,4 @@ function HotelListingMapContent({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default memo(HotelListingMapContent)
|
export default HotelListingMapContent
|
||||||
|
|||||||
Reference in New Issue
Block a user