Skip to content

Commit 6f010f7

Browse files
committed
fix header
1 parent 9232df3 commit 6f010f7

File tree

1 file changed

+5
-5
lines changed
  • src/app/shared/components/my-shared/header

1 file changed

+5
-5
lines changed

src/app/shared/components/my-shared/header/header.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ export class HeaderComponent {
5555
this.needReloadAvatar$ = this.store.select(
5656
selectVariable('reloadAvatarHeader')
5757
);
58-
59-
this.timeExpiresAt =
60-
decodeJWT(localStorage.getItem('token') ?? '')?.expiresAt || '';
61-
const expiresAt = new Date(this.timeExpiresAt).getTime();
62-
this.isLoggedIn = !isNaN(expiresAt) && Date.now() < expiresAt;
6358
}
6459

6560
ngOnInit() {
@@ -93,6 +88,11 @@ export class HeaderComponent {
9388
});
9489

9590
this.getCountNotice();
91+
92+
this.timeExpiresAt =
93+
decodeJWT(localStorage.getItem('token') ?? '')?.expiresAt || '';
94+
const expiresAt = new Date(this.timeExpiresAt).getTime();
95+
this.isLoggedIn = !isNaN(expiresAt) && Date.now() < expiresAt;
9696
}
9797

9898
organizations = [

0 commit comments

Comments
 (0)