From 1e64f8b6b622784b8b5911937ac29b71057f0556 Mon Sep 17 00:00:00 2001 From: Linus Flood Date: Thu, 19 Sep 2024 14:45:21 +0200 Subject: [PATCH] Hide hotelreservation route and contentPages --- app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx | 3 +++ app/[lang]/(live)/(public)/hotelreservation/layout.tsx | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx b/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx index 8ef1cb2bd..cbb83a9dc 100644 --- a/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx +++ b/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx @@ -23,6 +23,9 @@ export default async function ContentTypePage({ switch (params.contentType) { case "content-page": + if (env.HIDE_FOR_NEXT_RELEASE) { + return notFound() + } return case "loyalty-page": return diff --git a/app/[lang]/(live)/(public)/hotelreservation/layout.tsx b/app/[lang]/(live)/(public)/hotelreservation/layout.tsx index ee96f3c10..85d219fa8 100644 --- a/app/[lang]/(live)/(public)/hotelreservation/layout.tsx +++ b/app/[lang]/(live)/(public)/hotelreservation/layout.tsx @@ -1,3 +1,7 @@ +import { notFound } from "next/navigation" + +import { env } from "@/env/server" + import styles from "./layout.module.css" import { LangParams, LayoutArgs } from "@/types/params" @@ -5,5 +9,8 @@ import { LangParams, LayoutArgs } from "@/types/params" export default function HotelReservationLayout({ children, }: React.PropsWithChildren>) { + if (env.HIDE_FOR_NEXT_RELEASE) { + return notFound() + } return
{children}
}