Skip to content

Instantly share code, notes, and snippets.

@allpwrfulroot
Created December 18, 2019 02:28
Show Gist options
  • Save allpwrfulroot/8105ab5891b678949a966580d51d9f6e to your computer and use it in GitHub Desktop.
Save allpwrfulroot/8105ab5891b678949a966580d51d9f6e to your computer and use it in GitHub Desktop.
Implementing our AuthProvider
import React from 'react'
import App from 'next/app'
import { AuthProvider } from 'contexts/auth'
import Layout from 'components/layout'
class MyApp extends App {
render() {
const { Component, pageProps } = this.props
return (
<AuthProvider>
<Layout>
<Component {...pageProps} />
</Layout>
</AuthProvider>
)
}
}
export default MyApp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment