mirror of
https://github.com/hazemKrimi/personal-website.git
synced 2026-05-02 02:10:27 +00:00
Remove typescript type warnings
This commit is contained in:
+2
-2
@@ -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(<App {...props} />)
|
||||
enhanceApp: (App: any) => (props: any) => sheet.collectStyles(<App {...props} />)
|
||||
});
|
||||
|
||||
const initialProps = await Document.getInitialProps(ctx);
|
||||
|
||||
Reference in New Issue
Block a user