mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
20 lines
459 B
JavaScript
20 lines
459 B
JavaScript
|
import 'cross-fetch/polyfill'
|
||
|
import { Provider } from 'graphql-react'
|
||
|
import { withGraphQL } from 'next-graphql-react'
|
||
|
import App, { Container } from 'next/app'
|
||
|
|
||
|
class CustomApp extends App {
|
||
|
render () {
|
||
|
const { Component, pageProps, graphql } = this.props
|
||
|
return (
|
||
|
<Container>
|
||
|
<Provider value={graphql}>
|
||
|
<Component {...pageProps} />
|
||
|
</Provider>
|
||
|
</Container>
|
||
|
)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default withGraphQL(CustomApp)
|