Created
July 17, 2020 17:31
-
-
Save FrankGerold/5b4c19bb3dddad66895e8be1bff9ca74 to your computer and use it in GitHub Desktop.
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
const AppComponent = ({ Component, pageProps }) => { | |
return <div> | |
<Component {...pageProps} /> | |
</div> | |
}; | |
AppComponent.getInitialProps = async appContext => { | |
let pageProps = {}; | |
if (appContext.Component.getInitialProps) { | |
pageProps = await appContext.Component.getInitialProps(appContext.ctx); | |
}; | |
return { | |
pageProps | |
}; | |
}; | |
export default AppComponent; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment