mirror of
https://github.com/theoludwig/theoludwig.git
synced 2024-11-15 16:43:12 +01:00
27 lines
773 B
TypeScript
27 lines
773 B
TypeScript
|
import "@repo/config-tailwind/styles.css"
|
||
|
import type { LocaleProps } from "@repo/i18n/config"
|
||
|
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"
|
||
|
import { unstable_setRequestLocale } from "next-intl/server"
|
||
|
|
||
|
interface MainLayoutProps extends React.PropsWithChildren, LocaleProps {}
|
||
|
|
||
|
const MainLayout: React.FC<MainLayoutProps> = async (props) => {
|
||
|
const { children, params } = props
|
||
|
|
||
|
// Enable static rendering
|
||
|
unstable_setRequestLocale(params.locale)
|
||
|
|
||
|
return (
|
||
|
<ThemeProvider>
|
||
|
<Header />
|
||
|
{children}
|
||
|
<Footer version={VERSION} />
|
||
|
</ThemeProvider>
|
||
|
)
|
||
|
}
|
||
|
|
||
|
export default MainLayout
|