diff --git a/frontend/src/app/feature/auth/register/register.component.ts b/frontend/src/app/feature/auth/register/register.component.ts index 8ad38bb..a421184 100644 --- a/frontend/src/app/feature/auth/register/register.component.ts +++ b/frontend/src/app/feature/auth/register/register.component.ts @@ -1,5 +1,6 @@ import { Component, EventEmitter, Output, signal } from '@angular/core'; import { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; +import { Router } from '@angular/router'; import { RegisterRequest } from '../../../model/auth/RegisterRequest'; import { AuthService } from '@service/auth.service'; import { CommonModule } from '@angular/common'; @@ -21,7 +22,8 @@ export class RegisterComponent { constructor( private fb: FormBuilder, - private authService: AuthService + private authService: AuthService, + private router: Router ) { this.registerForm = this.fb.group({ email: ['', [Validators.required, Validators.email]], @@ -54,11 +56,6 @@ export class RegisterComponent { }; this.authService.register(registerRequest).subscribe({ - next: () => { - this.isLoading.set(false); - this.closeDialog.emit(); - this.switchToLogin(); - }, error: (err: HttpErrorResponse) => { this.isLoading.set(false);