Files

18 lines
407 B
JavaScript

import App from 'next/app'
import { setConfig } from '../lib/config'
setConfig({ hello: 'world' })
function MyApp({ Component, pageProps }) {
return <Component {...pageProps} />
}
MyApp.getInitialProps = async (appContext) => {
// calls page's `getInitialProps` and fills `appProps.pageProps`
const appProps = await App.getInitialProps(appContext)
return { ...appProps }
}
export default MyApp