icynet-admin/pages/_app.tsx

24 lines
539 B
TypeScript

import '../styles/globals.scss';
import type { AppProps } from 'next/app';
import { SWRConfig } from 'swr';
import fetchJson from '../lib/utils/swr-fetcher';
import ModalRoot from '../components/common/Modal/ModalRoot/ModalRoot';
function MyApp({ Component, pageProps }: AppProps) {
return (
<SWRConfig
value={{
fetcher: fetchJson,
onError: (err) => {
console.error(err);
},
}}
>
<Component {...pageProps} />
<ModalRoot />
</SWRConfig>
);
}
export default MyApp;