Created
October 11, 2020 18:07
-
-
Save AlbionaHoti/d8d1c489eb027bb11a62d5037b82db34 to your computer and use it in GitHub Desktop.
webiny-starter-e-commerce-nextjs-stripe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ApolloProvider } from '@apollo/client' | |
import { useApollo } from '../lib/apolloClient' | |
import { ApolloProvider as ApolloHooksProvider } from '@apollo/react-hooks' | |
// Layout Component | |
import LayoutContent from '../components/LayoutContent' | |
// React Context | |
import { CartProvider } from '../context/Context' | |
export default function App({ Component, pageProps }) { | |
const apolloClient = useApollo(pageProps.initialApolloState) | |
return ( | |
<ApolloProvider client={apolloClient}> | |
<ApolloHooksProvider client={apolloClient}> | |
<CartProvider> | |
<LayoutContent> | |
<Component {...pageProps} /> | |
</LayoutContent> | |
</CartProvider> | |
</ApolloHooksProvider> | |
</ApolloProvider> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment