icynet-admin/pages/_app.tsx

26 lines
615 B
TypeScript

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