Merged in feat/SW-1549-map-improvements (pull request #1783)
Feat/SW-1549 map improvements * fix: imported new icon * refactor: rename component and set map handling to 'greedy' * fix: show cards for 3s after hover * refactor: update styles and added HotelPin component * fix: change from close to back icon * refactor: update to only use 1 state value for active pin and card * fix: add click handler when dialog is opened * fix: performance fixes for the dialog carousel * fix: added border * fix: clear timeout on mouseenter * fix: changed to absolute import * fix: moved hover state into the store * fix: renamed store actions Approved-by: Michael Zetterberg
This commit is contained in:
@@ -37,7 +37,7 @@ export default function HotelCardListing({
|
||||
const activeFilters = useHotelFilterStore((state) => state.activeFilters)
|
||||
const setResultCount = useHotelFilterStore((state) => state.setResultCount)
|
||||
const intl = useIntl()
|
||||
const { activeHotelCard } = useHotelsMapStore()
|
||||
const { activeHotel } = useHotelsMapStore()
|
||||
const { showBackToTop, scrollToTop } = useScrollToTop({ threshold: 490 })
|
||||
const activeCardRef = useRef<HTMLDivElement | null>(null)
|
||||
|
||||
@@ -108,7 +108,7 @@ export default function HotelCardListing({
|
||||
inline: "center",
|
||||
})
|
||||
}
|
||||
}, [activeHotelCard, type])
|
||||
}, [activeHotel, type])
|
||||
|
||||
useEffect(() => {
|
||||
setResultCount(hotels.length)
|
||||
@@ -116,8 +116,7 @@ export default function HotelCardListing({
|
||||
|
||||
function isHotelActiveInMapView(hotelName: string): boolean {
|
||||
return (
|
||||
hotelName === activeHotelCard &&
|
||||
type === HotelCardListingTypeEnum.MapListing
|
||||
hotelName === activeHotel && type === HotelCardListingTypeEnum.MapListing
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user