feat: merge stores, fix auto navigation, split summary
This commit is contained in:
@@ -1,9 +1,4 @@
|
||||
import { Lang } from "@/constants/languages"
|
||||
import {
|
||||
GetRoomsAvailabilityInput,
|
||||
GetSelectedRoomAvailabilityInput,
|
||||
HotelDataInput,
|
||||
} from "@/server/routers/hotels/input"
|
||||
|
||||
import { cache } from "@/utils/cache"
|
||||
|
||||
@@ -13,6 +8,11 @@ import type {
|
||||
BreackfastPackagesInput,
|
||||
PackagesInput,
|
||||
} from "@/types/requests/packages"
|
||||
import type {
|
||||
GetRoomsAvailabilityInput,
|
||||
GetSelectedRoomAvailabilityInput,
|
||||
HotelDataInput,
|
||||
} from "@/server/routers/hotels/input"
|
||||
|
||||
export const getLocations = cache(async function getMemoizedLocations() {
|
||||
return serverClient().hotel.locations.get()
|
||||
@@ -60,21 +60,21 @@ export const getUserTracking = cache(async function getMemoizedUserTracking() {
|
||||
return serverClient().user.tracking()
|
||||
})
|
||||
|
||||
export const getHotelData = cache(function getMemoizedHotelData(
|
||||
props: HotelDataInput
|
||||
export const getHotelData = cache(async function getMemoizedHotelData(
|
||||
input: HotelDataInput
|
||||
) {
|
||||
return serverClient().hotel.hotelData.get(props)
|
||||
return serverClient().hotel.hotelData.get(input)
|
||||
})
|
||||
|
||||
export const getHotelPage = cache(async function getMemoizedHotelPage() {
|
||||
return serverClient().contentstack.hotelPage.get()
|
||||
})
|
||||
|
||||
export const getRoomsAvailability = cache(function getMemoizedRoomAvailability(
|
||||
args: GetRoomsAvailabilityInput
|
||||
) {
|
||||
return serverClient().hotel.availability.rooms(args)
|
||||
})
|
||||
export const getRoomsAvailability = cache(
|
||||
async function getMemoizedRoomAvailability(input: GetRoomsAvailabilityInput) {
|
||||
return serverClient().hotel.availability.rooms(input)
|
||||
}
|
||||
)
|
||||
|
||||
export const getSelectedRoomAvailability = cache(
|
||||
function getMemoizedSelectedRoomAvailability(
|
||||
|
||||
Reference in New Issue
Block a user