From 280b22af550cc1ad904eb1fe5d69ab09642b9bb8 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 12 Apr 2023 21:43:45 +0200 Subject: [PATCH] Fixed register re nav #306 --- .../forget-password/forget-password.component.ts | 2 +- .../auth/components/registration/registration.component.ts | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/kdb-web/src/app/modules/auth/components/forget-password/forget-password.component.ts b/kdb-web/src/app/modules/auth/components/forget-password/forget-password.component.ts index 66d570db..85b44e9b 100644 --- a/kdb-web/src/app/modules/auth/components/forget-password/forget-password.component.ts +++ b/kdb-web/src/app/modules/auth/components/forget-password/forget-password.component.ts @@ -40,7 +40,7 @@ export class ForgetPasswordComponent implements OnInit { ngOnInit(): void { this.spinnerService.showSpinner(); - if (!this.authService.isLoggedIn$.value) { + if (this.authService.isLoggedIn$.value) { this.router.navigate(["/dashboard"]); } diff --git a/kdb-web/src/app/modules/auth/components/registration/registration.component.ts b/kdb-web/src/app/modules/auth/components/registration/registration.component.ts index 86abe3b2..db52dfa5 100644 --- a/kdb-web/src/app/modules/auth/components/registration/registration.component.ts +++ b/kdb-web/src/app/modules/auth/components/registration/registration.component.ts @@ -49,7 +49,7 @@ export class RegistrationComponent implements OnInit, OnDestroy { private settings: SettingsService ) { this.spinnerService.showSpinner(); - if (!this.authService.isLoggedIn$.value) { + if (this.authService.isLoggedIn$.value) { this.router.navigate(["/dashboard"]); } this.spinnerService.hideSpinner(); @@ -57,7 +57,6 @@ export class RegistrationComponent implements OnInit, OnDestroy { ngOnInit(): void { this.translate.onLangChange.pipe(takeUntil(this.unsubscriber)).subscribe(lang => { - this.confirmPrivacyString = this.translate.instant("auth.register.confirm_privacy", { url: this.settings.getPrivacyURL() }); }); @@ -167,8 +166,4 @@ export class RegistrationComponent implements OnInit, OnDestroy { }); } } - - log($event: Event): void { - console.log($event); - } }