Unverified Commit ba2fbc2b authored by Patrick Krawczykowski's avatar Patrick Krawczykowski Committed by GitHub

Update _app.js to use a function component. (#16683)

This PR updates the `_app.js` file to remove the `next/app` import. It's not needed with the latest versions of Next
parent 6926ab7b
import App from 'next/app'
import { ThemeProvider } from 'styled-components' import { ThemeProvider } from 'styled-components'
const theme = { const theme = {
...@@ -7,13 +6,10 @@ const theme = { ...@@ -7,13 +6,10 @@ const theme = {
}, },
} }
export default class MyApp extends App { export default function App({ Component, pageProps }) {
render() {
const { Component, pageProps } = this.props
return ( return (
<ThemeProvider theme={theme}> <ThemeProvider theme={theme}>
<Component {...pageProps} /> <Component {...pageProps} />
</ThemeProvider> </ThemeProvider>
) )
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment