Merged in feat/SW-1750-map-connection (pull request #1439)
Feat(SW-1750): Destination page map connection Approved-by: Erik Tiekstra
This commit is contained in:
16
apps/scandic-web/stores/destination-page-hotels-map.ts
Normal file
16
apps/scandic-web/stores/destination-page-hotels-map.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { create } from "zustand"
|
||||
|
||||
interface DestinationPageHotelsMapState {
|
||||
hoveredHotel: string | null
|
||||
clickedHotel: string | null
|
||||
setHoveredHotel: (hotelId: string | null) => void
|
||||
setClickedHotel: (hotelId: string | null) => void
|
||||
}
|
||||
|
||||
export const useDestinationPageHotelsMapStore =
|
||||
create<DestinationPageHotelsMapState>((set) => ({
|
||||
hoveredHotel: null,
|
||||
clickedHotel: null,
|
||||
setHoveredHotel: (hotelId) => set({ hoveredHotel: hotelId }),
|
||||
setClickedHotel: (hotelId) => set({ clickedHotel: hotelId }),
|
||||
}))
|
||||
Reference in New Issue
Block a user