mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 16:17:13 +01:00
Merge pull request #793 from gaeulbyul/patch-1
Fix checking prefers-color-scheme media query
This commit is contained in:
commit
f1520fbb29
1 changed files with 1 additions and 1 deletions
|
|
@ -7,7 +7,7 @@ import { useEffect } from 'react';
|
||||||
export default function useTheme() {
|
export default function useTheme() {
|
||||||
const defaultTheme =
|
const defaultTheme =
|
||||||
typeof window !== 'undefined'
|
typeof window !== 'undefined'
|
||||||
? window?.matchMedia('prefers-color-scheme: dark')?.matches
|
? window?.matchMedia('(prefers-color-scheme: dark)')?.matches
|
||||||
? 'dark'
|
? 'dark'
|
||||||
: 'light'
|
: 'light'
|
||||||
: 'light';
|
: 'light';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue