fix: handle no children
This commit is contained in:
@@ -17,7 +17,7 @@ type Props = {
|
||||
hotelId: number
|
||||
lang: Lang
|
||||
adultCount: number
|
||||
childArray: Child[]
|
||||
childArray?: Child[]
|
||||
fromDate: Date
|
||||
toDate: Date
|
||||
}
|
||||
@@ -36,7 +36,7 @@ export async function NoRoomsAlert({
|
||||
roomStayStartDate: dt(fromDate).format("YYYY-MM-DD"),
|
||||
roomStayEndDate: dt(toDate).format("YYYY-MM-DD"),
|
||||
adults: adultCount,
|
||||
children: generateChildrenString(childArray), // TODO: Handle multiple rooms,
|
||||
children: childArray ? generateChildrenString(childArray) : undefined, // TODO: Handle multiple rooms,
|
||||
})
|
||||
)
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ type Props = {
|
||||
fromDate: Date
|
||||
toDate: Date
|
||||
adultCount: number
|
||||
childArray: Child[]
|
||||
childArray?: Child[]
|
||||
}
|
||||
|
||||
export default async function HotelInfoCard({
|
||||
|
||||
Reference in New Issue
Block a user