ws-nextjs-app/pages/_document.page.tsx
Function render
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { clientSideEnvVariables, css, helmet, ids, isApp, isLite } =
this.props;
const htmlAttrs = helmet.htmlAttributes.toComponent();
Function handleServerLogging
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const handleServerLogging = (ctx: DocumentContext) => {
const url = ctx.asPath || '';
const headers = removeSensitiveHeaders(ctx.req?.headers);
const pageType = derivePageType(url);
const { statusCode } = ctx.res || {};
Function getInitialProps
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static async getInitialProps(ctx: DocumentContext) {
const url = ctx.asPath || '';
const isApp = isAppPath(url);
const isLite = isLitePath(url);