11import { Component , OnInit } from '@angular/core' ;
22import { FormControl , FormGroup , ReactiveFormsModule , Validators } from '@angular/forms' ;
3- import { ActivatedRoute , Router , RouterLink } from '@angular/router' ;
3+ import { ActivatedRoute , RouterLink } from '@angular/router' ;
44import { BehaviorSubject , firstValueFrom } from 'rxjs' ;
55import { AsyncPipe } from '@angular/common' ;
66
@@ -23,8 +23,7 @@ export class ResetPasswordPage implements OnInit {
2323
2424 constructor (
2525 private readonly auth : AuthService ,
26- private readonly route : ActivatedRoute ,
27- private readonly router : Router
26+ private readonly route : ActivatedRoute
2827 ) {
2928 this . form = new FormGroup ( {
3029 password : new FormControl ( '' , [ Validators . required , Validators . minLength ( 8 ) ] ) ,
@@ -60,7 +59,8 @@ export class ResetPasswordPage implements OnInit {
6059
6160 if ( success ) {
6261 this . state$ . next ( 'success' ) ;
63- setTimeout ( ( ) => this . router . navigate ( [ '/workers' ] ) , 2000 ) ;
62+ // Hard reload to clear in-memory caches from previous session
63+ setTimeout ( ( ) => ( window . location . href = '/workers' ) , 2000 ) ;
6464 } else {
6565 this . state$ . next ( 'error' ) ;
6666 }
0 commit comments