19 lines
341 B
JavaScript
19 lines
341 B
JavaScript
import { SWRConfig } from 'swr'
|
|
import fetch from '../lib/fetchJson'
|
|
|
|
function MyApp({ Component, pageProps }) {
|
|
return (
|
|
<SWRConfig
|
|
value={{
|
|
fetcher: fetch,
|
|
onError: (err) => {
|
|
console.error(err)
|
|
},
|
|
}}
|
|
>
|
|
<Component {...pageProps} />
|
|
</SWRConfig>
|
|
)
|
|
}
|
|
|
|
export default MyApp
|