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