diff --git a/pages/_document.tsx b/pages/_document.tsx index f259e73..c4cbd26 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -2,14 +2,14 @@ import Document from 'next/document'; import { ServerStyleSheet } from 'styled-components'; class Doc extends Document { - static async getInitialProps(ctx) { + static async getInitialProps(ctx: any) { const sheet = new ServerStyleSheet(); const originalRenderPage = ctx.renderPage; try { ctx.renderPage = () => originalRenderPage({ - enhanceApp: App => props => sheet.collectStyles() + enhanceApp: (App: any) => (props: any) => sheet.collectStyles() }); const initialProps = await Document.getInitialProps(ctx);