feat: change usermanagement from git submodule to componenet based

This commit is contained in:
mengstabketemaw
2026-06-23 11:10:35 +03:00
parent 9c035e7333
commit f876d57219
34 changed files with 2601 additions and 3622 deletions

View File

@@ -21,8 +21,10 @@ export const authStorage = {
}
},
setUser: <T>(u: T) => localStorage.setItem(key('auth-user'), JSON.stringify(u)),
getProfileId: () => localStorage.getItem(key('profile-id')) ?? undefined,
setProfileId: (id: string) => localStorage.setItem(key('profile-id'), id),
clear: () => {
[key('auth-token'), key('refresh-token'), key('auth-user')].forEach((k) =>
[key('auth-token'), key('refresh-token'), key('auth-user'), key('profile-id')].forEach((k) =>
localStorage.removeItem(k),
);
document.cookie =