|
|
|
|
@ -42,19 +42,3 @@ export default function App({ Component, pageProps }) {
|
|
|
|
|
</ErrorBoundary>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
App.getInitialProps = async ({ Component, ctx }) => {
|
|
|
|
|
let pageProps = {}
|
|
|
|
|
|
|
|
|
|
if (Component.getInitialProps) {
|
|
|
|
|
pageProps = await Component.getInitialProps(ctx)
|
|
|
|
|
} else if (Component.isMDXComponent) {
|
|
|
|
|
// fix for https://github.com/mdx-js/mdx/issues/382
|
|
|
|
|
const mdxLayoutComponent = Component({}).props.originalType
|
|
|
|
|
if (mdxLayoutComponent.getInitialProps) {
|
|
|
|
|
pageProps = await mdxLayoutComponent.getInitialProps(ctx)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return { pageProps }
|
|
|
|
|
}
|
|
|
|
|
|