44 lines
1.5 KiB
TypeScript
44 lines
1.5 KiB
TypeScript
/* eslint-disable react/jsx-props-no-spreading */
|
|
import { AppProps } from "next/app";
|
|
import { SessionProvider } from "next-auth/react";
|
|
import { CssBaseline } from "@mui/material";
|
|
import { CacheProvider, EmotionCache } from "@emotion/react";
|
|
import { AdapterDateFns } from "@mui/x-date-pickers-pro/AdapterDateFns";
|
|
import { LocalizationProvider } from "@mui/x-date-pickers-pro";
|
|
import createEmotionCache from "lib/createEmotionCache";
|
|
import "@fontsource/poppins/400.css";
|
|
import "@fontsource/poppins/700.css";
|
|
import "@fontsource/roboto/400.css";
|
|
import "@fontsource/roboto/700.css";
|
|
import "@fontsource/playfair-display/900.css";
|
|
import "styles/global.css";
|
|
import { LicenseInfo } from "@mui/x-data-grid-pro";
|
|
|
|
LicenseInfo.setLicenseKey(
|
|
"fd009c623acc055adb16370731be92e4T1JERVI6NDA3NTQsRVhQSVJZPTE2ODAyNTAwMTUwMDAsS0VZVkVSU0lPTj0x"
|
|
);
|
|
|
|
const clientSideEmotionCache: any = createEmotionCache();
|
|
|
|
interface LinkWebProps extends AppProps {
|
|
// eslint-disable-next-line react/require-default-props
|
|
emotionCache?: EmotionCache;
|
|
}
|
|
|
|
const LinkWeb = (props: LinkWebProps) => {
|
|
const { Component, emotionCache = clientSideEmotionCache, pageProps } = props;
|
|
|
|
return (
|
|
<SessionProvider session={(pageProps as any).session}>
|
|
<CacheProvider value={emotionCache}>
|
|
<CssBaseline />
|
|
|
|
<LocalizationProvider dateAdapter={AdapterDateFns}>
|
|
<Component {...pageProps} />
|
|
</LocalizationProvider>
|
|
</CacheProvider>
|
|
</SessionProvider>
|
|
);
|
|
};
|
|
|
|
export default LinkWeb;
|