aboutsummaryrefslogtreecommitdiffstats
path: root/pages/_app.js
blob: 0fec9f6273cdea7cdc61caf9408261514b0655d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { SWRConfig } from 'swr'
import {PopupProvider} from 'hooks/usePopup'
import fetchJson from 'lib/fetchJson'
import '/styles/global.scss'

function MyApp({Component, pageProps}) {
  return (
    <SWRConfig
      value={{
        fetcher: fetchJson,
        onError: (err) => {
          console.error(err)
        },
      }}
    >
      <PopupProvider>
        <Component {...pageProps} />
      </PopupProvider>
    </SWRConfig>
  )
}

export default MyApp