Skip to content

Commit

Permalink
solves stale committee data
Browse files Browse the repository at this point in the history
  • Loading branch information
toddlees committed Feb 13, 2024
1 parent b2f4bd5 commit 52663d5
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion front-end/src/app/login/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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();
Expand Down

0 comments on commit 52663d5

Please sign in to comment.