feat: SW-683 SW-684 Prefill location & date in BW via query params

This commit is contained in:
Hrishikesh Vaipurkar
2024-10-23 13:45:56 +02:00
parent d8bc677b4d
commit 8fe4294bf9
6 changed files with 89 additions and 11 deletions

View File

@@ -33,7 +33,10 @@ export default function Form({ locations, type }: BookingWidgetFormProps) {
const bookingFlowPage =
locationData.type == "cities" ? selectHotel[lang] : selectRate[lang]
const bookingWidgetParams = new URLSearchParams(data.date)
const bookingWidgetParams = new URLSearchParams({
fromDate: data.date.from,
toDate: data.date.to,
})
if (locationData.type == "cities")
bookingWidgetParams.set("city", locationData.name)