mirror of
https://github.com/kremalicious/blog.git
synced 2024-12-22 09:13:35 +01:00
test fix
This commit is contained in:
parent
2c171a5ee7
commit
c35e26ea14
@ -42,7 +42,7 @@ export default function useDarkMode(): {
|
|||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!isClient) return
|
if (!isClient || process.env.NODE_ENV === 'test') return
|
||||||
|
|
||||||
const darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)')
|
const darkModeQuery = window.matchMedia('(prefers-color-scheme: dark)')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user