icynet-admin/pages/_app.tsx

22 lines
447 B
TypeScript
Raw Normal View History

2022-08-29 18:09:28 +00:00
import '../styles/globals.scss';
import type { AppProps } from 'next/app';
import { SWRConfig } from 'swr';
import fetchJson from '../lib/utils/swr-fetcher';
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);
},
}}
>
<Component {...pageProps} />
</SWRConfig>
);
2022-08-29 14:53:03 +00:00
}
2022-08-29 18:09:28 +00:00
export default MyApp;