Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}, {}),
}
: null;
const experiments = getExperiments(req);
initializeLocalState(filteredUser, experiments);
const apolloClient = createApolloClient(req);
const context = {};
const locale = getLocale(req);
const translations = languages[locale];
// For Material UI setup.
const sheets = new ServerStyleSheets();
const sheetsNonMaterialUI = new SheetsRegistry();
const generateId = createGenerateId();
const coreApp = ;
// We need to set leave out Material-UI classname generation when traversing the React tree for
// Apollo data. a) it speeds things up, but b) if we didn't do this, on prod, it can cause
// classname hydration mismatches.
const completeApp = isApolloTraversal => (
apolloClient.extract()}
appName={appName}
appTime={gitInfo.gitTime}
appVersion={gitInfo.gitRev}
assetPathsByType={assetPathsByType}
csrfToken={req.csrfToken()}
defaultLocale={DEFAULT_LOCALE}
static async getInitialProps(ctx) {
const registry = new SheetsRegistry()
const generateId = createGenerateId()
const originalRenderPage = ctx.renderPage
ctx.renderPage = () =>
originalRenderPage({
enhanceApp: App => props => (
),
})
const initialProps = await Document.getInitialProps(ctx)
return {
...initialProps,
styles: (
<>