remove unneeded initialprops in app.js

This commit is contained in:
Jeff Escalante 2020-12-04 17:34:58 -05:00
parent 25380116f2
commit ad81e9df2f
No known key found for this signature in database
GPG Key ID: 32D23C61AB5450DB
1 changed files with 0 additions and 16 deletions

View File

@ -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 }
}