[logout] fix redirection

This commit is contained in:
nymkappa 2024-07-01 15:30:39 +09:00
parent b91f195955
commit 2d12d2e5ef
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE

View File

@ -61,12 +61,18 @@ export class MenuComponent implements OnInit, OnDestroy {
this.loggedOut.emit(true); this.loggedOut.emit(true);
if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) { if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) {
this.userMenuGroups$ = this.servicesApiServices.getUserMenuGroups$(); this.userMenuGroups$ = this.servicesApiServices.getUserMenuGroups$();
this.router.navigateByUrl('/'); if (window.location.toString().includes('services')) {
this.router.navigateByUrl('/login');
}
} }
}); });
} }
onLinkClick(link) { onLinkClick(link) {
if (link === 'logout') {
this.toggleMenu(false);
return;
}
if (!this.isServicesPage || this.isSmallScreen()) { if (!this.isServicesPage || this.isSmallScreen()) {
this.toggleMenu(false); this.toggleMenu(false);
} }