2018-12-17 16:34:32 +00:00
|
|
|
import App, { Container } from 'next/app'
|
2018-07-27 20:08:09 +00:00
|
|
|
import React from 'react'
|
|
|
|
import Header from '../components/Header'
|
|
|
|
|
|
|
|
export default class MyApp extends App {
|
|
|
|
static async getInitialProps ({ Component, router, ctx }) {
|
|
|
|
let pageProps = {}
|
|
|
|
|
|
|
|
if (Component.getInitialProps) {
|
|
|
|
pageProps = await Component.getInitialProps(ctx)
|
|
|
|
}
|
|
|
|
|
2018-12-17 16:34:32 +00:00
|
|
|
return { pageProps }
|
2018-07-27 20:08:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
render () {
|
2018-12-17 16:34:32 +00:00
|
|
|
const { Component, pageProps } = this.props
|
2018-07-27 20:08:09 +00:00
|
|
|
return (
|
|
|
|
<Container>
|
|
|
|
<Header />
|
|
|
|
<Component {...pageProps} />
|
|
|
|
</Container>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|