UNPKG

1.79 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../../pages/_app.tsx"],"names":["appGetInitialProps","Component","ctx","pageProps","App","React","render","props","origGetInitialProps","getInitialProps"],"mappings":"+IAAA,oDACA,+C,sGAiBA;AACA;AACA;AACA,GACA,cAAeA,CAAAA,kBAAf,CAAkC,CAChCC,SADgC,CAEhCC,GAFgC,CAAlC,CAGyC,CACvC,KAAMC,CAAAA,SAAS,CAAG,KAAM,+BAAoBF,SAApB,CAA+BC,GAA/B,CAAxB,CACA,MAAO,CAAEC,SAAF,CAAP,CACD,CAEc,KAAMC,CAAAA,GAAN,QAA2CC,gBAAMJ,SAG9D,CAIAK,MAAM,EAAG,CACP,KAAM,CAAEL,SAAF,CAAaE,SAAb,EAA2B,KAAKI,KAAtC,CAEA,mBAAO,6BAAC,SAAD,CAAeJ,SAAf,CAAP,CACD,CARD,C,oBAHmBC,G,CAIZI,mB,CAAsBR,kB,CAJVI,G,CAKZK,e,CAAkBT,kB","sourcesContent":["import React from 'react'\nimport {\n loadGetInitialProps,\n AppContextType,\n AppInitialProps,\n AppPropsType,\n NextWebVitalsMetric,\n} from '../next-server/lib/utils'\nimport { Router } from '../client/router'\n\nexport { AppInitialProps }\n\nexport { NextWebVitalsMetric }\n\nexport type AppContext = AppContextType<Router>\n\nexport type AppProps<P = {}> = AppPropsType<Router, P>\n\n/**\n * `App` component is used for initialize of pages. It allows for overwriting and full control of the `page` initialization.\n * This allows for keeping state between navigation, custom error handling, injecting additional data.\n */\nasync function appGetInitialProps({\n Component,\n ctx,\n}: AppContext): Promise<AppInitialProps> {\n const pageProps = await loadGetInitialProps(Component, ctx)\n return { pageProps }\n}\n\nexport default class App<P = {}, CP = {}, S = {}> extends React.Component<\n P & AppProps<CP>,\n S\n> {\n static origGetInitialProps = appGetInitialProps\n static getInitialProps = appGetInitialProps\n\n render() {\n const { Component, pageProps } = this.props as AppProps<CP>\n\n return <Component {...pageProps} />\n }\n}\n"]}
\No newline at end of file