Merged in fix/SW-2845-hotel-pins-map-screen (pull request #2437)

fix(SW-2845): remove hover state when clicking hotel card address

* fix(SW-2845): remove hover state when clicking hotel card address


Approved-by: Michael Zetterberg
This commit is contained in:
Tobias Johansson
2025-06-26 06:49:59 +00:00
parent 9b491c5364
commit 2cce2a95b7

View File

@@ -54,7 +54,8 @@ function HotelCard({
const lang = params.lang as Lang
const intl = useIntl()
const { activate, engage, disengageAfterDelay } = useHotelsMapStore()
const { activate, engage, disengage, disengageAfterDelay } =
useHotelsMapStore()
const amenities = hotel.detailedFacilities.slice(0, 5)
const router = useRouter()
@@ -65,6 +66,7 @@ function HotelCard({
const handleAddressClick = (event: React.MouseEvent) => {
event.preventDefault()
disengage() // Disengage the current hotel to avoid the hover state from being active when clicking on the address
activate(hotel.name)
router.push(`${selectHotelMap(lang)}?${searchParams.toString()}`)
}