From 813f58df60997a463a99cc7a51fd4833eb8e795c Mon Sep 17 00:00:00 2001 From: vanntile <33692650+vanntile@users.noreply.github.com> Date: Wed, 17 Mar 2021 10:04:59 +0200 Subject: [PATCH] fix: :bug: Dark mode --- pages/_app.tsx | 2 +- pages/_document.tsx | 6 ++---- styles/globals.css | 2 +- tailwind.config.js | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/pages/_app.tsx b/pages/_app.tsx index afba2c7..5e8c247 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -17,7 +17,7 @@ Router.events.on('routeChangeComplete', () => done()) Router.events.on('routeChangeError', () => done()) const App: React.FC = ({ Component, pageProps }): JSX.Element => ( - + diff --git a/pages/_document.tsx b/pages/_document.tsx index 99ecc93..9db9c9b 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -11,13 +11,11 @@ export default class MyDocument extends Document { render() { let csp = `default-src 'self'; script-src 'self' ${cspHashOf(NextScript.getInlineScriptSource(this.props))}` if (process.env.NODE_ENV !== 'production') { - csp = `style-src 'self' 'unsafe-inline'; font-src 'self' data:; default-src 'self'; script-src 'unsafe-eval' 'self' ${cspHashOf( - NextScript.getInlineScriptSource(this.props), - )}` + csp = `style-src 'self' 'unsafe-inline'; font-src 'self' data:; default-src 'self'; script-src 'unsafe-inline' 'unsafe-eval' 'self'` } return ( - +