feat: SW-276 Optimized code removed vanilla implmentation
This commit is contained in:
@@ -3,8 +3,6 @@
|
||||
import { produce } from "immer"
|
||||
import { create } from "zustand"
|
||||
|
||||
import { createSelectors } from "./utils"
|
||||
|
||||
import { BedTypeEnum } from "@/types/components/bookingWidget/enums"
|
||||
import { Child } from "@/types/components/bookingWidget/guestsRoomsPicker"
|
||||
|
||||
@@ -32,7 +30,7 @@ interface GuestsRooms {
|
||||
setIsValidated: (isValidated: boolean) => void
|
||||
}
|
||||
|
||||
export const useGuestsRoomsStoreBase = create<GuestsRooms>((set, get) => ({
|
||||
export const useGuestsRoomsStore = create<GuestsRooms>((set, get) => ({
|
||||
rooms: [
|
||||
{
|
||||
adults: 1,
|
||||
@@ -144,5 +142,3 @@ export const useGuestsRoomsStoreBase = create<GuestsRooms>((set, get) => ({
|
||||
),
|
||||
setIsValidated: (isValidated) => set(() => ({ isValidated })),
|
||||
}))
|
||||
|
||||
export const useGuestsRoomsStore = createSelectors(useGuestsRoomsStoreBase)
|
||||
|
||||
Reference in New Issue
Block a user