fix: rename children to childrenInRoom
This commit is contained in:
@@ -26,7 +26,6 @@ import {
|
||||
type TrackingSDKHotelInfo,
|
||||
type TrackingSDKPageData,
|
||||
} from "@/types/components/tracking"
|
||||
import type { Lang } from "@/constants/languages"
|
||||
|
||||
function isValidHotelData(hotel: NullableHotelData): hotel is HotelData {
|
||||
return hotel !== null && hotel !== undefined
|
||||
@@ -37,7 +36,7 @@ export async function SelectHotelMapContainer({
|
||||
selectHotelParams,
|
||||
adultsInRoom,
|
||||
childrenInRoom,
|
||||
child,
|
||||
childrenInRoomString,
|
||||
}: SelectHotelMapContainerProps) {
|
||||
const lang = getLang()
|
||||
const googleMapId = env.GOOGLE_DYNAMIC_MAP_ID
|
||||
@@ -49,7 +48,7 @@ export async function SelectHotelMapContainer({
|
||||
roomStayStartDate: selectHotelParams.fromDate,
|
||||
roomStayEndDate: selectHotelParams.toDate,
|
||||
adults: adultsInRoom,
|
||||
children: childrenInRoom,
|
||||
children: childrenInRoomString,
|
||||
})
|
||||
)
|
||||
|
||||
@@ -83,9 +82,11 @@ export async function SelectHotelMapContainer({
|
||||
arrivalDate: format(arrivalDate, "yyyy-MM-dd"),
|
||||
departureDate: format(departureDate, "yyyy-MM-dd"),
|
||||
noOfAdults: adultsInRoom,
|
||||
noOfChildren: child?.length,
|
||||
ageOfChildren: child?.map((c) => c.age).join(","),
|
||||
childBedPreference: child?.map((c) => ChildBedMapEnum[c.bed]).join("|"),
|
||||
noOfChildren: childrenInRoom?.length,
|
||||
ageOfChildren: childrenInRoom?.map((c) => c.age).join(","),
|
||||
childBedPreference: childrenInRoom
|
||||
?.map((c) => ChildBedMapEnum[c.bed])
|
||||
.join("|"),
|
||||
noOfRooms: 1, // // TODO: Handle multiple rooms
|
||||
duration: differenceInCalendarDays(departureDate, arrivalDate),
|
||||
leadTime: differenceInCalendarDays(arrivalDate, new Date()),
|
||||
|
||||
Reference in New Issue
Block a user