36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
JavaScript
//import "../styles/globals.css";
|
|
import "../styles/sass/styles.scss";
|
|
import Loading from "../components/loading";
|
|
import { wrapper } from "../store/store";
|
|
import { useStore, Provider } from "react-redux";
|
|
import { persistStore } from "redux-persist";
|
|
import { PersistGate } from "redux-persist/integration/react";
|
|
import { SessionProvider as AuthProvider } from "next-auth/react";
|
|
import { Tracking } from "../components/tracking";
|
|
import { GoogleAnalytics } from "@next/third-parties/google";
|
|
import Azureappinsights from "../components/azureappinsights";
|
|
const MyApp = ({ Component, pageProps: { session, ...pageProps } }) => {
|
|
const store = useStore((state) => state);
|
|
const persistor = persistStore(store, {}, function () {
|
|
persistor.persist();
|
|
});
|
|
|
|
return (
|
|
<AuthProvider session={session}>
|
|
<Provider store={store}>
|
|
<PersistGate
|
|
persistor={store.__persistor}
|
|
loading={<Loading />}
|
|
>
|
|
<Azureappinsights>
|
|
<Component {...pageProps} />
|
|
</Azureappinsights>
|
|
<GoogleAnalytics gaId="G-GTWW3JT03Z" />
|
|
</PersistGate>
|
|
</Provider>
|
|
</AuthProvider>
|
|
);
|
|
};
|
|
|
|
export default wrapper.withRedux(MyApp);
|