feat(BOOK-450): Added theme to hotel page only, reverting previous theme handing on the body tag
Approved-by: Linus Flood
This commit is contained in:
@@ -34,7 +34,6 @@ import { FontPreload } from "@/fonts/font-preloading"
|
||||
import { getMessages } from "@/i18n"
|
||||
import ClientIntlProvider from "@/i18n/Provider"
|
||||
import { setLang } from "@/i18n/serverContext"
|
||||
import { getThemeClass } from "@/utils/theme"
|
||||
|
||||
import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
|
||||
@@ -42,17 +41,15 @@ export default async function RootLayout(
|
||||
props: React.PropsWithChildren<
|
||||
LayoutArgs<LangParams> & {
|
||||
bookingwidget: React.ReactNode
|
||||
theme: React.ReactNode
|
||||
}
|
||||
>
|
||||
) {
|
||||
const params = await props.params
|
||||
|
||||
const { bookingwidget, theme, children } = props
|
||||
const { bookingwidget, children } = props
|
||||
|
||||
setLang(params.lang)
|
||||
const messages = await getMessages(params.lang)
|
||||
const themeClass = await getThemeClass(params.lang)
|
||||
|
||||
return (
|
||||
<html lang={params.lang}>
|
||||
@@ -67,7 +64,7 @@ export default async function RootLayout(
|
||||
window.dataLayer = window.dataLayer || []
|
||||
`}</Script>
|
||||
</head>
|
||||
<body className={themeClass}>
|
||||
<body className="scandic">
|
||||
<div className="root">
|
||||
<SessionProvider basePath="/api/web/auth">
|
||||
<ClientIntlProvider
|
||||
@@ -75,7 +72,6 @@ export default async function RootLayout(
|
||||
locale={params.lang}
|
||||
messages={messages}
|
||||
>
|
||||
{theme}
|
||||
<NuqsAdapter>
|
||||
<TrpcProvider>
|
||||
<RACRouterProvider>
|
||||
|
||||
Reference in New Issue
Block a user