fix: the theme align with the system

This commit is contained in:
jialin
2025-07-30 11:12:13 +08:00
parent 72f7168893
commit ada120c1b9
2 changed files with 4 additions and 4 deletions
+1
View File
@@ -53,6 +53,7 @@ export default function useUserSettings() {
useEffect(() => {
if (userSettings.mode !== 'auto') return;
setTheme('auto');
const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');
const handleChange = () => {
setTheme('auto');