2024-07-31 19:23:14 +02:00
|
|
|
import "@repo/config-tailwind/styles.css"
|
2024-11-09 19:50:22 +01:00
|
|
|
import type { LocaleProps } from "@repo/i18n/routing"
|
2024-07-31 19:23:14 +02:00
|
|
|
import { Footer } from "@repo/ui/Layout/Footer"
|
|
|
|
import { Header } from "@repo/ui/Layout/Header"
|
|
|
|
import { ThemeProvider } from "@repo/ui/Layout/Header/SwitchTheme"
|
|
|
|
import { VERSION } from "@repo/utils/constants"
|
2024-11-09 19:50:22 +01:00
|
|
|
import { setRequestLocale } from "next-intl/server"
|
2024-07-31 19:23:14 +02:00
|
|
|
|
|
|
|
interface MainLayoutProps extends React.PropsWithChildren, LocaleProps {}
|
|
|
|
|
|
|
|
const MainLayout: React.FC<MainLayoutProps> = async (props) => {
|
|
|
|
const { children, params } = props
|
|
|
|
|
2024-11-09 19:50:22 +01:00
|
|
|
const { locale } = await params
|
2024-07-31 19:23:14 +02:00
|
|
|
// Enable static rendering
|
2024-11-09 19:50:22 +01:00
|
|
|
setRequestLocale(locale)
|
2024-07-31 19:23:14 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<ThemeProvider>
|
|
|
|
<Header />
|
|
|
|
{children}
|
|
|
|
<Footer version={VERSION} />
|
|
|
|
</ThemeProvider>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default MainLayout
|