2023-08-11 11:48:33 +00:00
|
|
|
"use client";
|
|
|
|
|
2023-08-08 07:25:42 +00:00
|
|
|
// root styles
|
|
|
|
import "styles/globals.css";
|
2023-08-30 07:19:15 +00:00
|
|
|
|
|
|
|
// next theme
|
|
|
|
import { ThemeProvider } from "next-themes";
|
|
|
|
|
|
|
|
// toast alert
|
|
|
|
import { ToastContextProvider } from "contexts/toast.context";
|
|
|
|
|
2023-08-11 11:48:33 +00:00
|
|
|
// mobx store provider
|
|
|
|
import { MobxStoreProvider } from "lib/mobx/store-provider";
|
|
|
|
import MobxStoreInit from "lib/mobx/store-init";
|
2023-08-08 07:25:42 +00:00
|
|
|
|
|
|
|
const RootLayout = ({ children }: { children: React.ReactNode }) => (
|
2023-08-30 07:19:15 +00:00
|
|
|
<html lang="en" suppressHydrationWarning>
|
|
|
|
<body className="antialiased bg-custom-background-90 w-100">
|
2023-08-11 11:48:33 +00:00
|
|
|
<MobxStoreProvider>
|
|
|
|
<MobxStoreInit />
|
2023-08-30 07:19:15 +00:00
|
|
|
<ToastContextProvider>
|
|
|
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
|
|
<main>{children}</main>
|
|
|
|
</ThemeProvider>
|
|
|
|
</ToastContextProvider>
|
2023-08-11 11:48:33 +00:00
|
|
|
</MobxStoreProvider>
|
2023-08-08 07:25:42 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
);
|
|
|
|
|
|
|
|
export default RootLayout;
|