diff --git a/hooks/useTheme.js b/hooks/useTheme.js index 9807f866..3b13de3d 100644 --- a/hooks/useTheme.js +++ b/hooks/useTheme.js @@ -7,7 +7,7 @@ import { useEffect } from 'react'; export default function useTheme() { const defaultTheme = typeof window !== 'undefined' - ? window?.matchMedia('prefers-color-scheme: dark')?.matches + ? window?.matchMedia('(prefers-color-scheme: dark)')?.matches ? 'dark' : 'light' : 'light';