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