From 5e81ec0eaf93e4e6eb9c8ddf61d03f3fda381ab3 Mon Sep 17 00:00:00 2001 From: Erik Tiekstra Date: Wed, 29 Oct 2025 14:06:59 +0000 Subject: [PATCH] fix(BOOK-450): Re added the check for hotel branding feature flag before setting theme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Approved-by: Bianca Widstam Approved-by: Matilda Landström --- .../(public)/(contentTypes)/hotel_page/[uid]/page.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx b/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx index c78019d27..6406b1c5d 100644 --- a/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx +++ b/apps/scandic-web/app/[lang]/(live)/(public)/(contentTypes)/hotel_page/[uid]/page.tsx @@ -1,12 +1,14 @@ import { cx } from "class-variance-authority" import { notFound } from "next/navigation" +import { env } from "@/env/server" import { getHotel, getHotelPage } from "@/lib/trpc/memoizedRequests" import HotelMapPage from "@/components/ContentType/HotelMapPage" import HotelPage from "@/components/ContentType/HotelPage" import HotelSubpage from "@/components/ContentType/HotelSubpage" import { getThemeByHotel } from "@/utils/theme" +import { DEFAULT_THEME } from "@/utils/theme/types" import styles from "./page.module.css" @@ -35,10 +37,9 @@ export default async function HotelPagePage( return notFound() } - const hotelTheme = getThemeByHotel( - hotelPageData.hotel_page_id, - hotelData.hotel.hotelType - ) + const hotelTheme = env.HOTEL_BRANDING + ? getThemeByHotel(hotelPageData.hotel_page_id, hotelData.hotel.hotelType) + : DEFAULT_THEME if (searchParams.subpage) { return (