Fix local/session storage parsing/stringifying values

The old logic stringifyed all values, including strings, which caused problems with reading external stored values (e.g., mui-mode) via the "useStorage" hook.
This commit is contained in:
schroda
2025-07-28 02:30:25 +02:00
parent fb00f51107
commit ef6c1fce56
4 changed files with 26 additions and 10 deletions

View File

@@ -86,7 +86,7 @@ export const Appearance = () => {
setThemeMode(newMode as ThemeMode);
setMode(newMode);
// in case a non "colorSchemes" mui theme is active, "setMode" does not update the mode ("mui-mode") value
AppStorage.local.setItem('mui-mode', newMode, true, false);
AppStorage.local.setItem('mui-mode', newMode, true);
}}
>
<MenuItem key={ThemeMode.SYSTEM} value={ThemeMode.SYSTEM}>