Improve authentication flow and navigation handling
- Replace never-resolving promise with rejection - Remove unnecessary setTimeout in navigation
This commit is contained in:
@@ -67,14 +67,10 @@ class NavigationService {
|
||||
return;
|
||||
}
|
||||
|
||||
// First navigate to login page
|
||||
this.navigate('/login');
|
||||
this.resetAllApplicationState();
|
||||
useAuthStore.getState().logout();
|
||||
|
||||
// Then reset state after navigation
|
||||
setTimeout(() => {
|
||||
this.resetAllApplicationState();
|
||||
useAuthStore.getState().logout();
|
||||
}, 0);
|
||||
this.navigate('/login');
|
||||
}
|
||||
|
||||
navigateToHome() {
|
||||
|
Reference in New Issue
Block a user