diff --git a/.env.local.example b/.env.local.example index c747c3e1e..6d842230e 100644 --- a/.env.local.example +++ b/.env.local.example @@ -48,3 +48,5 @@ GOOGLE_STATIC_MAP_KEY="" GOOGLE_STATIC_MAP_SIGNATURE_SECRET="" GOOGLE_STATIC_MAP_ID="" GOOGLE_DYNAMIC_MAP_ID="" + +HIDE_FOR_NEXT_RELEASE="true" diff --git a/.env.test b/.env.test index d2b538cc2..d2d1037ac 100644 --- a/.env.test +++ b/.env.test @@ -41,3 +41,4 @@ GOOGLE_STATIC_MAP_KEY="test" GOOGLE_STATIC_MAP_SIGNATURE_SECRET="test" GOOGLE_STATIC_MAP_ID="test" GOOGLE_DYNAMIC_MAP_ID="test" +HIDE_FOR_NEXT_RELEASE="true" diff --git a/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx b/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx index a162b6d1b..cbb83a9dc 100644 --- a/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx +++ b/app/[lang]/(live)/(public)/[contentType]/[uid]/page.tsx @@ -1,5 +1,7 @@ import { notFound } from "next/navigation" +import { env } from "@/env/server" + import ContentPage from "@/components/ContentType/ContentPage" import HotelPage from "@/components/ContentType/HotelPage" import LoyaltyPage from "@/components/ContentType/LoyaltyPage" @@ -21,10 +23,16 @@ export default async function ContentTypePage({ switch (params.contentType) { case "content-page": + if (env.HIDE_FOR_NEXT_RELEASE) { + return notFound() + } return case "loyalty-page": return case "hotel-page": + if (env.HIDE_FOR_NEXT_RELEASE) { + return notFound() + } return default: const type: never = params.contentType 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}
} diff --git a/app/[lang]/(live)/@header/page.tsx b/app/[lang]/(live)/@header/page.tsx index 7f01d8eb5..9d777ffef 100644 --- a/app/[lang]/(live)/@header/page.tsx +++ b/app/[lang]/(live)/@header/page.tsx @@ -1,3 +1,6 @@ +import { env } from "@/env/server" + +import CurrentHeader from "@/components/Current/Header" import Header from "@/components/Header" import { setLang } from "@/i18n/serverContext" @@ -6,5 +9,9 @@ import { LangParams, PageArgs } from "@/types/params" export default function HeaderPage({ params }: PageArgs) { setLang(params.lang) + if (env.HIDE_FOR_NEXT_RELEASE) { + return + } + return
} diff --git a/app/[lang]/(live)/layout.tsx b/app/[lang]/(live)/layout.tsx index 33ba651d4..23857acb4 100644 --- a/app/[lang]/(live)/layout.tsx +++ b/app/[lang]/(live)/layout.tsx @@ -4,10 +4,12 @@ import "@scandic-hotels/design-system/style.css" import Script from "next/script" import { Suspense } from "react" +import { env } from "@/env/server" import TrpcProvider from "@/lib/trpc/Provider" import TokenRefresher from "@/components/Auth/TokenRefresher" import AdobeSDKScript from "@/components/Current/AdobeSDKScript" +import CurrentFooter from "@/components/Current/Footer" import VwoScript from "@/components/Current/VwoScript" import Footer from "@/components/Footer" import LoadingSpinner from "@/components/LoadingSpinner" @@ -56,11 +58,11 @@ export default async function RootLayout({ {header} - {bookingwidget} + {!env.HIDE_FOR_NEXT_RELEASE && <>{bookingwidget}} {children} }> -