rsnext/examples/with-iron-session/pages/_app.js
2020-05-18 15:24:37 -04:00

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