Skip to content

Commit 59bb438

Browse files
committed
refactor: persist explicit 'light' theme preference instead of removing storage key
- Change toggleTheme to store 'light' in localStorage instead of removing the key when switching to light mode - Ensures theme preference is always explicitly stored rather than relying on key absence
1 parent 7b1e5ee commit 59bb438

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

new-deepnotes/apps/web/src/features/theme/useThemePreference.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function toggleTheme(): void {
3939
localStorage.setItem(STORAGE_KEY, "dark");
4040
} else {
4141
html.classList.remove("dark");
42-
localStorage.removeItem(STORAGE_KEY);
42+
localStorage.setItem(STORAGE_KEY, "light");
4343
}
4444
_isDark.value = next;
4545
}

0 commit comments

Comments
 (0)