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:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user