Checks for user

This commit is contained in:
Aaron Louie 2020-06-02 00:23:50 -04:00
parent ef15c712ba
commit 6784b6ca1e
1 changed files with 5 additions and 1 deletions

View File

@ -39,7 +39,11 @@ export class NavbarComponent {
if (isSignedIn()) {
this.api.getUser().subscribe(u => {
this.user = u;
if (this.user && this.user.uid) {
this.googleAnalyticsService.setUser(this.user.uid);
}
this._loadNavLinks();
}, error => {
localStorage.removeItem('token');