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.
This commit is contained in:
Gigi
2025-10-10 13:19:34 +01:00
parent 307dc3d726
commit 5e66c5ef76

View File

@@ -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')
}