mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
18 lines
407 B
JavaScript
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
|