From 5e66c5ef762764ccf59c5604982a31f91dbe43db Mon Sep 17 00:00:00 2001 From: Gigi Date: Fri, 10 Oct 2025 13:19:34 +0100 Subject: [PATCH] fix: correct logout functionality by using null instead of undefined The logout button wasn't working because setActive was being called with 'undefined as never', which is an incorrect type hack. Changed to use null instead, which properly clears the active account. Also removed redundant localStorage.removeItem('active') call since the active$ subscription already handles localStorage cleanup. --- src/App.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index e3197cc0..561954e0 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -27,8 +27,7 @@ function AppRoutes({ const accountManager = Hooks.useAccountManager() const handleLogout = () => { - accountManager.setActive(undefined as never) - localStorage.removeItem('active') + accountManager.setActive(null) showToast('Logged out successfully') }