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>
)
}

View File

@@ -12,6 +12,7 @@ import { SessionProvider } from "next-auth/react"
import StorageCleaner from "@scandic-hotels/booking-flow/components/EnterDetails/StorageCleaner"
import { NuqsAdapter } from "@scandic-hotels/booking-flow/utils/nuqs"
import { Lang } from "@scandic-hotels/common/constants/language"
import { DEFAULT_THEME } from "@scandic-hotels/common/utils/theme"
import { ToastHandler } from "@scandic-hotels/design-system/ToastHandler"
import TrpcProvider from "@/lib/trpc/Provider"
@@ -63,7 +64,7 @@ export default async function RootLayout(
window.dataLayer = window.dataLayer || []
`}</Script>
</head>
<body className="scandic">
<body className={DEFAULT_THEME}>
<div className="root">
<SessionProvider basePath="/api/web/auth">
<ClientIntlProvider