From 52663d5deb775bb85d1135d47e0314895431cd76 Mon Sep 17 00:00:00 2001 From: toddlees Date: Tue, 13 Feb 2024 11:50:29 -0500 Subject: [PATCH] solves stale committee data --- front-end/src/app/login/login/login.component.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/front-end/src/app/login/login/login.component.ts b/front-end/src/app/login/login/login.component.ts index 73dd468f48..6afe645fc2 100644 --- a/front-end/src/app/login/login/login.component.ts +++ b/front-end/src/app/login/login/login.component.ts @@ -3,6 +3,8 @@ import { environment } from '../../../environments/environment'; import { LoginService } from '../../shared/services/login.service'; import { Store } from '@ngrx/store'; import { userLoggedOutAction } from 'app/store/login.actions'; +import { setCommitteeAccountDetailsAction } from 'app/store/committee-account.actions'; +import { CommitteeAccount } from 'app/shared/models/committee-account.model'; @Component({ selector: 'app-login', @@ -13,11 +15,15 @@ export class LoginComponent implements OnInit { public loginDotGovAuthUrl: string | undefined; public localLoginAvailable = false; - constructor(private loginService: LoginService, private store: Store) {} + constructor( + private loginService: LoginService, + private store: Store, + ) {} ngOnInit() { localStorage.clear(); this.loginService.clearUserLoggedInCookies(); + this.store.dispatch(setCommitteeAccountDetailsAction({ payload: new CommitteeAccount() })); this.store.dispatch(userLoggedOutAction()); this.loginDotGovAuthUrl = environment.loginDotGovAuthUrl; this.checkLocalLoginAvailability();