()
| 11 | const THEME_KEY = 'mediacrawler_theme' |
| 12 | |
| 13 | function getSystemTheme(): 'light' | 'dark' { |
| 14 | if (typeof window === 'undefined') return 'light' |
| 15 | return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' |
| 16 | } |
| 17 | |
| 18 | function getStoredTheme(): Theme { |
| 19 | if (typeof window === 'undefined') return 'light' |