diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/page.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/page.tsx index ca39e25b8..0c0dd409b 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/page.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/page.tsx @@ -9,7 +9,7 @@ import type { LangParams, PageArgs } from "@/types/params" export default function HotelReservationPage({ params }: PageArgs) { setLang(params.lang) - if (!env.ENABLE_BOOKING_FLOW) { + if (!env.ENABLE_BOOKING_WIDGET_HOTELRESERVATION_PATH) { return null } diff --git a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/layout.tsx b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/layout.tsx index ab5f62674..907b02c2a 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/layout.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/(standard)/select-hotel/layout.tsx @@ -1,7 +1,3 @@ -import { notFound } from "next/navigation" - -import { env } from "@/env/server" - import styles from "./layout.module.css" import { LangParams, LayoutArgs } from "@/types/params" @@ -12,9 +8,6 @@ export default function HotelReservationLayout({ }: React.PropsWithChildren< LayoutArgs & { modal: React.ReactNode } >) { - if (env.HIDE_FOR_NEXT_RELEASE) { - return notFound() - } return (
{children} diff --git a/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/page.tsx b/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/page.tsx index 2ebaca014..03a82e5f5 100644 --- a/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/page.tsx +++ b/app/[lang]/(live)/@bookingwidget/hotelreservation/[...paths]/page.tsx @@ -1 +1 @@ -export { default } from "../../page" +export { default } from "../page" diff --git a/app/[lang]/(live)/@bookingwidget/hotelreservation/page.tsx b/app/[lang]/(live)/@bookingwidget/hotelreservation/page.tsx new file mode 100644 index 000000000..d3ec595df --- /dev/null +++ b/app/[lang]/(live)/@bookingwidget/hotelreservation/page.tsx @@ -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 +} diff --git a/app/[lang]/(live)/@bookingwidget/loading.tsx b/app/[lang]/(live)/@bookingwidget/loading.tsx index c45dee2ad..6c1b94c2d 100644 --- a/app/[lang]/(live)/@bookingwidget/loading.tsx +++ b/app/[lang]/(live)/@bookingwidget/loading.tsx @@ -3,7 +3,7 @@ import { env } from "@/env/server" import { BookingWidgetSkeleton } from "@/components/BookingWidget/Client" export default function LoadingBookingWidget() { - if (env.HIDE_FOR_NEXT_RELEASE) { + if (!env.ENABLE_BOOKING_FLOW) { return null } diff --git a/app/[lang]/(live)/@bookingwidget/page.tsx b/app/[lang]/(live)/@bookingwidget/page.tsx index a2c4b15ca..794218e52 100644 --- a/app/[lang]/(live)/@bookingwidget/page.tsx +++ b/app/[lang]/(live)/@bookingwidget/page.tsx @@ -8,7 +8,7 @@ import { PageArgs } from "@/types/params" export default async function BookingWidgetPage({ searchParams, }: PageArgs<{}, URLSearchParams>) { - if (!env.ENABLE_BOOKING_WIDGET_HOTELRESERVATION_PATH) { + if (!env.ENABLE_BOOKING_WIDGET) { return null }