Comment out GIP in Custom <App> (#8055)
This commit is contained in:
parent
5a54e8715a
commit
7eed8380f1
1 changed files with 14 additions and 9 deletions
|
@ -1421,15 +1421,20 @@ import React from 'react'
|
|||
import App, { Container } from 'next/app'
|
||||
|
||||
class MyApp extends App {
|
||||
static async getInitialProps({ Component, ctx }) {
|
||||
let pageProps = {}
|
||||
|
||||
if (Component.getInitialProps) {
|
||||
pageProps = await Component.getInitialProps(ctx)
|
||||
}
|
||||
|
||||
return { pageProps }
|
||||
}
|
||||
// Only uncomment this method if you have blocking data requirements for
|
||||
// every single page in your application. This disables the ability to
|
||||
// perform automatic static optimization, causing every page in your app to
|
||||
// be server-side rendered.
|
||||
//
|
||||
// static async getInitialProps({ Component, ctx }) {
|
||||
// let pageProps = {}
|
||||
//
|
||||
// if (Component.getInitialProps) {
|
||||
// pageProps = await Component.getInitialProps(ctx)
|
||||
// }
|
||||
//
|
||||
// return { pageProps }
|
||||
// }
|
||||
|
||||
render() {
|
||||
const { Component, pageProps } = this.props
|
||||
|
|
Loading…
Reference in a new issue