2022-08-29 18:09:28 +00:00
|
|
|
import '../styles/globals.scss';
|
|
|
|
import type { AppProps } from 'next/app';
|
|
|
|
import { SWRConfig } from 'swr';
|
2022-09-12 19:31:58 +00:00
|
|
|
import fetchJson from '../lib/utils/fetch';
|
2022-08-30 18:08:54 +00:00
|
|
|
import ModalRoot from '../components/common/Modal/ModalRoot/ModalRoot';
|
2022-09-01 14:23:11 +00:00
|
|
|
import { Toaster } from 'react-hot-toast';
|
2022-08-29 14:53:03 +00:00
|
|
|
|
|
|
|
function MyApp({ Component, pageProps }: AppProps) {
|
2022-08-29 18:09:28 +00:00
|
|
|
return (
|
|
|
|
<SWRConfig
|
|
|
|
value={{
|
|
|
|
fetcher: fetchJson,
|
|
|
|
onError: (err) => {
|
|
|
|
console.error(err);
|
|
|
|
},
|
|
|
|
}}
|
|
|
|
>
|
2022-09-01 14:23:11 +00:00
|
|
|
<Toaster position="top-right" />
|
2022-08-29 18:09:28 +00:00
|
|
|
<Component {...pageProps} />
|
2022-08-30 18:08:54 +00:00
|
|
|
<ModalRoot />
|
2022-08-29 18:09:28 +00:00
|
|
|
</SWRConfig>
|
|
|
|
);
|
2022-08-29 14:53:03 +00:00
|
|
|
}
|
|
|
|
|
2022-08-29 18:09:28 +00:00
|
|
|
export default MyApp;
|