File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff 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 = [
You can’t perform that action at this time.
0 commit comments