Cleaned up the code a bit and some UX

This commit is contained in:
Joseph Milazzo 2020-12-20 18:02:57 -06:00
parent 2c0921acc6
commit b47d2acac8
10 changed files with 73 additions and 20 deletions

View file

@ -17,8 +17,8 @@ export class AppComponent implements OnInit {
setCurrentUser() {
const userString = localStorage.getItem('user');
if (userString !== '' || localStorage.getItem('user') !== undefined) {
const userString = localStorage.getItem(this.accountService.userKey);
if (userString !== '' || localStorage.getItem(this.accountService.userKey) !== undefined) {
const user: User = JSON.parse(userString + '');
this.accountService.setCurrentUser(user);
}