2023-08-30 08:11:25 +00:00
|
|
|
import type { AppProps } from "next/app";
|
|
|
|
import { ThemeProvider } from "next-themes";
|
2023-08-21 07:13:41 +00:00
|
|
|
// styles
|
|
|
|
import "styles/globals.css";
|
2023-08-30 08:11:25 +00:00
|
|
|
// contexts
|
|
|
|
import { ToastContextProvider } from "contexts/toast.context";
|
|
|
|
// mobx store provider
|
|
|
|
import { MobxStoreProvider } from "lib/mobx/store-provider";
|
|
|
|
import MobxStoreInit from "lib/mobx/store-init";
|
2023-08-21 07:13:41 +00:00
|
|
|
|
|
|
|
function MyApp({ Component, pageProps }: AppProps) {
|
2023-08-30 08:11:25 +00:00
|
|
|
return (
|
|
|
|
<MobxStoreProvider>
|
|
|
|
<MobxStoreInit />
|
|
|
|
<ToastContextProvider>
|
|
|
|
<ThemeProvider attribute="class" defaultTheme="system" enableSystem>
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</ThemeProvider>
|
|
|
|
</ToastContextProvider>
|
|
|
|
</MobxStoreProvider>
|
|
|
|
);
|
2023-08-21 07:13:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default MyApp;
|