From 9a90903b337d51c418eb609118fe7ecb3dfcb708 Mon Sep 17 00:00:00 2001 From: Bangara Raju Kottedi Date: Sun, 15 Feb 2026 15:23:57 +0530 Subject: [PATCH] fix: update returnUrl handling and navigation in OtpComponent --- src/app/auth/otp/otp.component.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/auth/otp/otp.component.ts b/src/app/auth/otp/otp.component.ts index 676fa10..d9bf3e2 100644 --- a/src/app/auth/otp/otp.component.ts +++ b/src/app/auth/otp/otp.component.ts @@ -19,7 +19,7 @@ export class OtpComponent implements OnInit { message = signal(''); countdown = signal(0); timer: NodeJS.Timeout | undefined; - returnUrl = '/'; + returnUrl = ''; fb: FormBuilder = inject(FormBuilder); authService: AuthService = inject(AuthService); router: Router = inject(Router); @@ -35,13 +35,13 @@ export class OtpComponent implements OnInit { }); if(this.authService.isLoggedIn()){ - this.router.navigateByUrl('/'); + this.router.navigate(['']); } } ngOnInit() { - this.returnUrl = this.route.snapshot.queryParamMap.get('returnUrl') || '/'; + this.returnUrl = this.route.snapshot.queryParamMap.get('returnUrl') || ''; } sendOtp() {