[auth] fix auth not being cleared after logout

This commit is contained in:
nymkappa
2023-08-21 15:01:31 +02:00
parent 3321ae0f1f
commit b8222bff43
2 changed files with 8 additions and 3 deletions

View File

@@ -42,8 +42,13 @@ export class MenuComponent implements OnInit {
}
logout(): void {
this.apiService.logout$().subscribe();
this.loggedOut.emit(true);
this.apiService.logout$().subscribe(() => {
this.loggedOut.emit(true);
if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) {
this.userMenuGroups$ = this.apiService.getUserMenuGroups$();
this.router.navigateByUrl('/');
}
});
}
onLinkClick() {