mirror of
https://github.com/kremalicious/umami.git
synced 2024-12-18 07:13:37 +01:00
Merge pull request #793 from gaeulbyul/patch-1
Fix checking prefers-color-scheme media query
This commit is contained in:
commit
f1520fbb29
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user