chore: reset the primary color after logout

This commit is contained in:
jialin
2025-11-21 16:56:23 +08:00
parent 3f63831488
commit ff67fba2c9
11 changed files with 49 additions and 23 deletions
+13
View File
@@ -1,5 +1,18 @@
import { getDefaultStore } from 'jotai';
export const clearStorageUserSettings = () => {
const savedSettings = JSON.parse(
localStorage.getItem('userSettings') || '{}'
);
localStorage.setItem(
'userSettings',
JSON.stringify({
...savedSettings,
colorPrimary: undefined
})
);
};
export const clearAtomStorage = (atom: any) => {
if (!atom) {
return;