feat: SW-683 SW-684 Prefill location & date in BW via query params
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user