[WEB-1657] dev: admin application code structuring. (#4867)

* [WEB-1657] dev: admin application code structuring.

* chore: update mobx-react-lite import to mobx-react.
This commit is contained in:
Prateek Shourya 2024-06-20 17:52:01 +05:30 committed by GitHub
parent 096d9b1541
commit 94e6fd4b29
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 148 additions and 123 deletions

View file

@ -16,10 +16,12 @@ import { UserProvider } from "@/lib/user-provider";
// styles
import "./globals.css";
export default function RootLayout({ children }: { children: ReactNode }) {
// themes
const ToastWithTheme = () => {
const { resolvedTheme } = useTheme();
return <Toast theme={resolveGeneralTheme(resolvedTheme)} />;
};
export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<head>
@ -31,7 +33,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
</head>
<body className={`antialiased`}>
<ThemeProvider themes={["light", "dark"]} defaultTheme="system" enableSystem>
<Toast theme={resolveGeneralTheme(resolvedTheme)} />
<ToastWithTheme />
<SWRConfig value={SWR_CONFIG}>
<StoreProvider>
<InstanceProvider>