diff --git a/lama_cleaner/app/src/components/Header/ThemeChanger.tsx b/lama_cleaner/app/src/components/Header/ThemeChanger.tsx index 17c11c5..25888c6 100644 --- a/lama_cleaner/app/src/components/Header/ThemeChanger.tsx +++ b/lama_cleaner/app/src/components/Header/ThemeChanger.tsx @@ -4,21 +4,12 @@ import { SunIcon, MoonIcon } from '@heroicons/react/outline' export const themeState = atom({ key: 'themeState', - default: 'light', + default: 'dark', }) export const ThemeChanger = () => { const [theme, setTheme] = useRecoilState(themeState) - useEffect(() => { - const darkThemeMq = window.matchMedia('(prefers-color-scheme: dark)') - if (darkThemeMq.matches) { - setTheme('dark') - } else { - setTheme('light') - } - }, [setTheme]) - const themeSwitchHandler = () => { const newTheme = theme === 'light' ? 'dark' : 'light' setTheme(newTheme)