feat: SW-276 Implemented child age validation

This commit is contained in:
Hrishikesh Vaipurkar
2024-09-18 13:24:35 +02:00
parent 24f7bc290d
commit a7167dde6a
10 changed files with 110 additions and 54 deletions

View File

@@ -23,6 +23,7 @@ export default function GuestsRoomsPicker({
},
],
closePicker,
childAgeError,
}: GuestsRoomsPickerProps) {
const lang = useLang()
const [selectedGuests, setSelectedGuests] =
@@ -62,26 +63,29 @@ export default function GuestsRoomsPicker({
return (
<>
{selectedGuests.map((room, index) => (
<section key={index}>
<section className={styles.roomContainer} key={index}>
<GuestsRoomPicker
room={room}
handleOnSelect={handleSelectRoomGuests}
index={index}
childAgeError={childAgeError}
/>
<Divider></Divider>
{index > 0 ? (
{/* Not in MVP
{index > 0 ? (
<Button intent="text" onClick={() => removeRoom(index)}>
Remove Room
</Button>
) : null}
) : null} */}
<Divider></Divider>
</section>
))}
<div className={styles.footer}>
{/* Not in MVP
{selectedGuests.length < 4 ? (
<Button intent="text" onClick={addRoom}>
Add Room
</Button>
) : null}
) : null} */}
<Button onClick={closePicker}>Done</Button>
</div>
</>