fix: rename children to childrenInRoom
This commit is contained in:
@@ -29,7 +29,7 @@ export default async function SelectRatePage({
|
||||
setLang(params.lang)
|
||||
const searchDetails = await getHotelSearchDetails({ searchParams })
|
||||
if (!searchDetails) return notFound()
|
||||
const { hotel, adultsInRoom, childrenInRoomArray, selectHotelParams } =
|
||||
const { hotel, adultsInRoom, childrenInRoom, selectHotelParams } =
|
||||
searchDetails
|
||||
|
||||
if (!hotel) return notFound()
|
||||
@@ -62,9 +62,9 @@ export default async function SelectRatePage({
|
||||
arrivalDate: format(arrivalDate, "yyyy-MM-dd"),
|
||||
departureDate: format(departureDate, "yyyy-MM-dd"),
|
||||
noOfAdults: adultsInRoom,
|
||||
noOfChildren: childrenInRoomArray?.length,
|
||||
ageOfChildren: childrenInRoomArray?.map((c) => c.age).join(","),
|
||||
childBedPreference: childrenInRoomArray
|
||||
noOfChildren: childrenInRoom?.length,
|
||||
ageOfChildren: childrenInRoom?.map((c) => c.age).join(","),
|
||||
childBedPreference: childrenInRoom
|
||||
?.map((c) => ChildBedMapEnum[c.bed])
|
||||
.join("|"),
|
||||
noOfRooms: 1, // // TODO: Handle multiple rooms
|
||||
@@ -88,7 +88,7 @@ export default async function SelectRatePage({
|
||||
fromDate={fromDate.toDate()}
|
||||
toDate={toDate.toDate()}
|
||||
adultCount={adultsInRoom}
|
||||
childArray={childrenInRoomArray}
|
||||
childArray={childrenInRoom}
|
||||
/>
|
||||
|
||||
<Suspense key={hotelId} fallback={<RoomsContainerSkeleton />}>
|
||||
@@ -98,7 +98,7 @@ export default async function SelectRatePage({
|
||||
fromDate={fromDate.toDate()}
|
||||
toDate={toDate.toDate()}
|
||||
adultCount={adultsInRoom}
|
||||
childArray={childrenInRoomArray}
|
||||
childArray={childrenInRoom}
|
||||
/>
|
||||
</Suspense>
|
||||
<Suspense fallback={null}>
|
||||
|
||||
Reference in New Issue
Block a user