🌟 Code Cleanup

This commit is contained in:
callumok2004
2021-06-21 04:01:23 +01:00
parent 9ed0a2954b
commit 7a1c636cf8
2 changed files with 18 additions and 7 deletions

View File

@@ -9,11 +9,11 @@ export default class MyDocument extends Document {
try { try {
ctx.renderPage = () => ctx.renderPage = () =>
originalRenderPage({ originalRenderPage({
enhanceApp: (App: any) => (props: any) => enhanceApp: App => props => sheet.collectStyles(<App {...props} />)
sheet.collectStyles(<App {...props} />),
}) })
const initialProps = await Document.getInitialProps(ctx) const initialProps = await Document.getInitialProps(ctx);
return { return {
...initialProps, ...initialProps,
styles: ( styles: (

View File

@@ -1,7 +1,11 @@
{ {
"compilerOptions": { "compilerOptions": {
"target": "es5", "target": "es5",
"lib": ["dom", "dom.iterable", "esnext"], "lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true, "allowJs": true,
"skipLibCheck": true, "skipLibCheck": true,
"strict": true, "strict": true,
@@ -14,6 +18,13 @@
"isolatedModules": true, "isolatedModules": true,
"jsx": "preserve" "jsx": "preserve"
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": [
"exclude": ["node_modules"] "next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"pages/_document.js"
],
"exclude": [
"node_modules"
]
} }