remove unneeded initialprops in app.js
This commit is contained in:
parent
25380116f2
commit
ad81e9df2f
|
@ -42,19 +42,3 @@ export default function App({ Component, pageProps }) {
|
||||||
</ErrorBoundary>
|
</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 }
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue