fix(auth): complete logout state cleanup and admin protected route token validation [TASK-26.8] [TASK-26.9]

This commit is contained in:
parsa aghaei committed 2026-08-05 14:39:31 +03:30
1 parent 350182c5a4
commit 7f3c04acf5
3 files changed
+39 -5

No files matched your search

@@ -164,7 +164,9 @@ export const useUserStore = create<UserStore>()(
logout: () => {
authService.logout();
try { usePetStore.getState().reset(); } catch {}
try { useCartStore.getState().clearCart(); } catch {}
try { localStorage.removeItem("canina-pets"); } catch {}
try { localStorage.removeItem("canina-cart-storage"); } catch {}
set({
role: "User_Guest",
isLoggedIn: false,