1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 01:03:37 +01:00
This commit is contained in:
Matthias Kretschmann 2021-03-13 04:56:07 +01:00
parent 2c171a5ee7
commit c35e26ea14
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -42,7 +42,7 @@ export default function useDarkMode(): {
}, [])
useEffect(() => {
if (!isClient) return
if (!isClient || process.env.NODE_ENV === 'test') return
const darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)')