Refactor and fixed bug

This commit is contained in:
Linus Flood
2024-11-27 19:51:15 +01:00
parent 267a47c61a
commit 31540d0d40
6 changed files with 21 additions and 11 deletions

View File

@@ -1 +1 @@
export { default } from "../../page"
export { default } from "../page"

View File

@@ -0,0 +1,17 @@
import { env } from "@/env/server"
import BookingWidget, { preload } from "@/components/BookingWidget"
import { PageArgs } from "@/types/params"
export default async function BookingWidgetPage({
searchParams,
}: PageArgs<{}, URLSearchParams>) {
if (!env.ENABLE_BOOKING_WIDGET_HOTELRESERVATION_PATH) {
return null
}
preload()
return <BookingWidget searchParams={searchParams} />
}