stacker.news/pages/_app.js

28 lines
748 B
JavaScript
Raw Normal View History

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-05-25 00:08:56 +00:00
import { MeProvider } from '../components/me'
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-25 00:08:56 +00:00
<ApolloProvider client={client}>
<MeProvider>
<FundErrorProvider>
<FundErrorModal />
<Component {...pageProps} />
</FundErrorProvider>
</MeProvider>
</ApolloProvider>
2021-04-12 18:05:09 +00:00
</Provider>
)
2021-03-22 20:36:10 +00:00
}
export default MyApp