Skip to content

Commit

Permalink
NextJS pages router patch
Browse files Browse the repository at this point in the history
  • Loading branch information
DiegoAndai committed Apr 18, 2024
1 parent 7442410 commit ea5bb0e
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,16 @@ import * as React from 'react';
import { AppType } from 'next/app';
import { EmotionCache } from '@emotion/react';
import createEmotionServer from '@emotion/server/create-instance';
import Document, { DocumentContext, DocumentInitialProps } from 'next/document';
import ImportedDocument, { DocumentContext, DocumentInitialProps } from 'next/document';
import { EmotionCacheProviderProps } from './pagesRouterV13App';
import createEmotionCache from './createCache';

let Document = ImportedDocument;
if (!Document.getInitialProps) {
// @ts-ignore
Document = Document.default;
}

interface Plugin {
enhanceApp: (
App: React.ComponentType<React.ComponentProps<AppType>>,
Expand Down

0 comments on commit ea5bb0e

Please sign in to comment.