Move more of BookingWidget to client SW-1639 * feat: move getLocations in booking widget to client side so that it's also cached on the client reducing the blinking when switching urls (and reducing duplicate calls) Approved-by: Linus Flood
17 lines
499 B
TypeScript
17 lines
499 B
TypeScript
import { env } from "@/env/server"
|
|
|
|
import BookingWidget from "@/components/BookingWidget"
|
|
|
|
import type { BookingWidgetSearchData } from "@/types/components/bookingWidget"
|
|
import type { LangParams, PageArgs } from "@/types/params"
|
|
|
|
export default async function BookingWidgetPage({
|
|
searchParams,
|
|
}: PageArgs<LangParams, BookingWidgetSearchData>) {
|
|
if (!env.ENABLE_BOOKING_WIDGET_HOTELRESERVATION_PATH) {
|
|
return null
|
|
}
|
|
|
|
return <BookingWidget bookingWidgetSearchParams={searchParams} />
|
|
}
|