From 2d12d2e5ef9b20582749651bc2e2e27517056d6a Mon Sep 17 00:00:00 2001 From: nymkappa <1612910616@pm.me> Date: Mon, 1 Jul 2024 15:30:39 +0900 Subject: [PATCH] [logout] fix redirection --- frontend/src/app/components/menu/menu.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/components/menu/menu.component.ts b/frontend/src/app/components/menu/menu.component.ts index 7a2d8b6ed..fe9fd5f09 100644 --- a/frontend/src/app/components/menu/menu.component.ts +++ b/frontend/src/app/components/menu/menu.component.ts @@ -61,12 +61,18 @@ export class MenuComponent implements OnInit, OnDestroy { this.loggedOut.emit(true); if (this.stateService.env.GIT_COMMIT_HASH_MEMPOOL_SPACE) { this.userMenuGroups$ = this.servicesApiServices.getUserMenuGroups$(); - this.router.navigateByUrl('/'); + if (window.location.toString().includes('services')) { + this.router.navigateByUrl('/login'); + } } }); } onLinkClick(link) { + if (link === 'logout') { + this.toggleMenu(false); + return; + } if (!this.isServicesPage || this.isSmallScreen()) { this.toggleMenu(false); }