fix(BOOK-450): Re added the check for hotel branding feature flag before setting theme

Approved-by: Bianca Widstam
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-10-29 14:06:59 +00:00
parent 2c6d9860e1
commit 5e81ec0eaf

View File

@@ -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 (