feat: consume serach params in summary and step page
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
import { cache } from "react"
|
||||
|
||||
import { Lang } from "@/constants/languages"
|
||||
import {
|
||||
GetRoomsAvailabilityInput,
|
||||
HotelIncludeEnum,
|
||||
} from "@/server/routers/hotels/input"
|
||||
|
||||
import { serverClient } from "../server"
|
||||
|
||||
@@ -53,12 +57,14 @@ export const getUserTracking = cache(async function getMemoizedUserTracking() {
|
||||
export const getHotelData = cache(async function getMemoizedHotelData(
|
||||
hotelId: string,
|
||||
language: string,
|
||||
isCardOnlyPayment?: boolean
|
||||
isCardOnlyPayment?: boolean,
|
||||
include?: HotelIncludeEnum[]
|
||||
) {
|
||||
return serverClient().hotel.hotelData.get({
|
||||
hotelId,
|
||||
language,
|
||||
isCardOnlyPayment,
|
||||
include,
|
||||
})
|
||||
})
|
||||
|
||||
@@ -71,17 +77,9 @@ export const getRoomAvailability = cache(
|
||||
children,
|
||||
promotionCode,
|
||||
rateCode,
|
||||
}: {
|
||||
hotelId: string
|
||||
adults: number
|
||||
roomStayStartDate: string
|
||||
roomStayEndDate: string
|
||||
children?: string
|
||||
promotionCode?: string
|
||||
rateCode?: string
|
||||
}) {
|
||||
}: GetRoomsAvailabilityInput) {
|
||||
return serverClient().hotel.availability.rooms({
|
||||
hotelId: parseInt(hotelId),
|
||||
hotelId,
|
||||
adults,
|
||||
roomStayStartDate,
|
||||
roomStayEndDate,
|
||||
|
||||
Reference in New Issue
Block a user