Proper fix.
This commit is contained in:
1 parent
5f41447158
commit
b294c8ef72
1 file changed
+1
-1
+1
-1
@@ -6,7 +6,7 @@ import { useEffect } from 'react';
|
||||
|
||||
export default function useTheme() {
|
||||
const defaultTheme =
|
||||
typeof window !== undefined
|
||||
typeof window !== 'undefined'
|
||||
? window?.matchMedia('prefers-color-scheme: dark')?.matches
|
||||
? 'dark'
|
||||
: 'light'
|
||||
|
||||
Reference in new issue
Block a user