16 lines
506 B
TypeScript
16 lines
506 B
TypeScript
import { create } from "zustand"
|
|
|
|
interface HotelsMapState {
|
|
activeHotelCard: string | null
|
|
activeHotelPin: string | null
|
|
setActiveHotelCard: (hotelCard: string | null) => void
|
|
setActiveHotelPin: (hotelPin: string | null) => void
|
|
}
|
|
|
|
export const useHotelsMapStore = create<HotelsMapState>((set) => ({
|
|
activeHotelCard: null,
|
|
activeHotelPin: null,
|
|
setActiveHotelCard: (hotelCard) => set({ activeHotelCard: hotelCard }),
|
|
setActiveHotelPin: (hotelPin) => set({ activeHotelPin: hotelPin }),
|
|
}))
|