fixed sidenav

Fixed the sidenav not displaying the current logged in user on the first load of the side
urls
FlayInAHook 4 years ago
parent f18da19bcc
commit 6228a69b4b

@ -15,9 +15,12 @@ export class SidenavProfileComponent implements OnInit {
ngOnInit() { ngOnInit() {
this.auth.currentUser.subscribe(user => { this.auth.currentUser.subscribe(user => {
this.name = user.user.name; console.log("change " + JSON.stringify(user));
this.email = user.user.email; if (user !== null){
this.profileURL = user.user.attributes.profile_url; this.name = user.user.name;
this.email = user.user.email;
this.profileURL = user.user.attributes.profile_url;
}
}); });
} }
} }
Loading…
Cancel
Save