()
| 1 | import { THEME, setStorageItem } from "./local-storage" |
| 2 | |
| 3 | export function getSystemTheme(): "light" | "dark" { |
| 4 | if (typeof window === "undefined") return "light" |
| 5 | return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light" |
| 6 | } |
| 7 | |
| 8 | export function getCurrentTheme(): "light" | "dark" { |
| 9 | if (typeof document === "undefined") return "light" |
no outgoing calls
no test coverage detected
searching dependent graphs…