[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:
parent
096d9b1541
commit
94e6fd4b29
67 changed files with 148 additions and 123 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue