feat: SW-276 Optimized code removed vanilla implmentation

This commit is contained in:
Hrishikesh Vaipurkar
2024-10-15 10:43:32 +02:00
parent adb63a827e
commit b2290b7ad3
8 changed files with 37 additions and 42 deletions

View File

@@ -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)