sub-task/ SW-695 Prefill Guests data in booking widget
This commit is contained in:
@@ -7,6 +7,7 @@ import { dt } from "@/lib/dt"
|
||||
|
||||
import DatePicker from "@/components/DatePicker"
|
||||
import GuestsRoomsPickerForm from "@/components/GuestsRoomsPicker"
|
||||
import GuestsRoomsProvider from "@/components/GuestsRoomsPicker/Provider/GuestsRoomsProvider"
|
||||
import { SearchIcon } from "@/components/Icons"
|
||||
import Button from "@/components/TempDesignSystem/Button"
|
||||
import Caption from "@/components/TempDesignSystem/Text/Caption"
|
||||
@@ -29,6 +30,8 @@ export default function FormContent({
|
||||
|
||||
const nights = dt(selectedDate.toDate).diff(dt(selectedDate.fromDate), "days")
|
||||
|
||||
const selectedGuests = useWatch({ name: "rooms" })
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className={styles.input}>
|
||||
@@ -51,7 +54,9 @@ export default function FormContent({
|
||||
{rooms}
|
||||
</Caption>
|
||||
</label>
|
||||
<GuestsRoomsPickerForm />
|
||||
<GuestsRoomsProvider selectedGuests={selectedGuests}>
|
||||
<GuestsRoomsPickerForm name="rooms" />
|
||||
</GuestsRoomsProvider>
|
||||
</div>
|
||||
</div>
|
||||
<div className={styles.voucherContainer}>
|
||||
|
||||
Reference in New Issue
Block a user