Skip to content

Commit

Permalink
fix: user status
Browse files Browse the repository at this point in the history
  • Loading branch information
biaogebusy committed May 20, 2024
1 parent 1704f42 commit f7e6aa7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export class UserMenuComponent implements OnInit, OnDestroy {
}
// logout
if (!currentUser) {
this.currentUser.authenticated = false;
this.cd.detectChanges();
}
});
Expand Down
4 changes: 2 additions & 2 deletions src/app/modules/user/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</div>
<div
class="flex flex-col justify-center items-center login-form p-3 z-10 overflow-hidden relative flex-12/12 sm:flex-6/12 box-border"
[class.is-login]="currentUser.authenticated">
[class.is-login]="currentUser?.authenticated">
<div class="w-full form-scroll" *ngIf="!loading">
<ng-container *ngIf="!currentUser.authenticated">
<div *ngIf="error" class="error p-3 mb-3">{{error}}
Expand Down Expand Up @@ -69,7 +69,7 @@
</mat-tab>
</mat-tab-group>
</ng-container>
<ng-container *ngIf="currentUser.authenticated">
<ng-container *ngIf="currentUser?.authenticated">
<h1 class="mat-h1 text-base">
Hi, {{currentUser.display_name}}
</h1>
Expand Down
1 change: 0 additions & 1 deletion src/app/modules/user/login/login.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ export class LoginComponent implements OnInit {
}
// logout
if (!currentUser) {
this.currentUser.authenticated = false;
this.cd.detectChanges();
}
});
Expand Down

0 comments on commit f7e6aa7

Please sign in to comment.