🌟 Code Cleanup

This commit is contained in:
callumok2004
2021-06-21 04:05:17 +01:00
parent a34ed541c5
commit baf3452e87
2 changed files with 4 additions and 3 deletions

View File

@@ -9,10 +9,11 @@ export default class MyDocument extends Document {
try { try {
ctx.renderPage = () => ctx.renderPage = () =>
originalRenderPage({ originalRenderPage({
enhanceApp: App => props => sheet.collectStyles(<App {...props} />) enhanceApp: (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

@@ -22,7 +22,7 @@
"next-env.d.ts", "next-env.d.ts",
"**/*.ts", "**/*.ts",
"**/*.tsx", "**/*.tsx",
"pages/_document.js" "pages/_document.tsx"
], ],
"exclude": [ "exclude": [
"node_modules" "node_modules"