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
+11 -2
View File
@@ -8,12 +8,21 @@ export function preload() {
void getLocations()
}
export default async function BookingWidget({ type }: BookingWidgetProps) {
export default async function BookingWidget({
type,
searchParams,
}: BookingWidgetProps) {
const locations = await getLocations()
if (!locations || "error" in locations) {
return null
}
return <BookingWidgetClient locations={locations.data} type={type} />
return (
<BookingWidgetClient
locations={locations.data}
type={type}
searchParams={searchParams}
/>
)
}