Feat/BOOK-63 hotel subpages branding

* feat(BOOK-63): Replaced css variables and components to apply hotel branding on subpages
* feat(BOOK-63): Replaced css variables and components to apply hotel branding on hotel page map view

Approved-by: Christel Westerberg
Approved-by: Matilda Landström
This commit is contained in:
Erik Tiekstra
2025-11-05 08:30:55 +00:00
parent 7fc49428c7
commit 3a38e99a71
47 changed files with 524 additions and 393 deletions

View File

@@ -5,6 +5,7 @@ import {
DEFAULT_THEME,
getThemeByHotel,
} from "@scandic-hotels/common/utils/theme"
import { setTheme } from "@scandic-hotels/common/utils/theme/serverContext"
import { env } from "@/env/server"
import { getHotel, getHotelPage } from "@/lib/trpc/memoizedRequests"
@@ -44,6 +45,8 @@ export default async function HotelPagePage(
? getThemeByHotel(hotelPageData.hotel_page_id, hotelData.hotel.hotelType)
: DEFAULT_THEME
setTheme(hotelTheme)
if (searchParams.subpage) {
return (
<div className={hotelTheme}>
@@ -59,11 +62,7 @@ export default async function HotelPagePage(
} else {
return (
<div className={cx(styles.hotelPage, hotelTheme)}>
<HotelPage
theme={hotelTheme}
hotelData={hotelData}
hotelPageData={hotelPageData}
/>
<HotelPage hotelData={hotelData} hotelPageData={hotelPageData} />
</div>
)
}