Langswitcher as parallel instead of Header. Using promise.all and added some Suspenses
This commit is contained in:
@@ -21,9 +21,11 @@ import type { LangParams, LayoutArgs } from "@/types/params"
|
||||
export default async function RootLayout({
|
||||
children,
|
||||
params,
|
||||
languageSwitcher,
|
||||
bookingwidget,
|
||||
}: React.PropsWithChildren<
|
||||
LayoutArgs<LangParams> & {
|
||||
languageSwitcher: React.ReactNode
|
||||
bookingwidget: React.ReactNode
|
||||
}
|
||||
>) {
|
||||
@@ -52,7 +54,7 @@ export default async function RootLayout({
|
||||
<body>
|
||||
<ServerIntlProvider intl={{ defaultLocale, locale, messages }}>
|
||||
<TrpcProvider>
|
||||
<Header />
|
||||
<Header languageSwitcher={languageSwitcher} />
|
||||
{bookingwidget}
|
||||
{children}
|
||||
<ToastHandler />
|
||||
|
||||
Reference in New Issue
Block a user