mirror of
https://github.com/umami-software/umami.git
synced 2025-12-08 05:12:36 +01:00
Fix checking prefers-color-scheme media query
This commit is contained in:
parent
9b1a75fd90
commit
b5b628ae3f
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue