2021-04-14 00:57:32 +00:00
|
|
|
import '../styles/globals.scss'
|
2021-04-12 18:05:09 +00:00
|
|
|
import { ApolloClient, InMemoryCache, ApolloProvider } from '@apollo/client'
|
|
|
|
import { Provider } from 'next-auth/client'
|
2021-05-20 21:32:59 +00:00
|
|
|
import { FundErrorModal, FundErrorProvider } from '../components/fund-error'
|
2021-04-12 18:05:09 +00:00
|
|
|
|
|
|
|
const client = new ApolloClient({
|
|
|
|
uri: '/api/graphql',
|
|
|
|
cache: new InMemoryCache()
|
|
|
|
})
|
2021-03-22 20:36:10 +00:00
|
|
|
|
2021-03-25 19:29:24 +00:00
|
|
|
function MyApp ({ Component, pageProps }) {
|
2021-04-12 18:05:09 +00:00
|
|
|
return (
|
|
|
|
<Provider session={pageProps.session}>
|
2021-05-20 21:32:59 +00:00
|
|
|
<FundErrorProvider>
|
|
|
|
<FundErrorModal />
|
|
|
|
<ApolloProvider client={client}>
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</ApolloProvider>
|
|
|
|
</FundErrorProvider>
|
2021-04-12 18:05:09 +00:00
|
|
|
</Provider>
|
|
|
|
)
|
2021-03-22 20:36:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default MyApp
|