mirror of
https://github.com/kremalicious/umami.git
synced 2025-02-14 21:10:34 +01:00
Fix checking prefers-color-scheme media query
This commit is contained in:
parent
9b1a75fd90
commit
b5b628ae3f
@ -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…
x
Reference in New Issue
Block a user