Cleaned up the code a bit and some UX
This commit is contained in:
parent
2c0921acc6
commit
b47d2acac8
10 changed files with 73 additions and 20 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue