diff options
Diffstat (limited to 'client/src/app/app.component.ts')
-rw-r--r-- | client/src/app/app.component.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/client/src/app/app.component.ts b/client/src/app/app.component.ts index 0ea3c1389..18115ae75 100644 --- a/client/src/app/app.component.ts +++ b/client/src/app/app.component.ts | |||
@@ -57,7 +57,7 @@ export class AppComponent implements OnInit { | |||
57 | 57 | ||
58 | this.authService.loadClientCredentials() | 58 | this.authService.loadClientCredentials() |
59 | 59 | ||
60 | if (this.authService.isLoggedIn()) { | 60 | if (this.isUserLoggedIn()) { |
61 | // The service will automatically redirect to the login page if the token is not valid anymore | 61 | // The service will automatically redirect to the login page if the token is not valid anymore |
62 | this.authService.refreshUserInformation() | 62 | this.authService.refreshUserInformation() |
63 | } | 63 | } |
@@ -104,6 +104,10 @@ export class AppComponent implements OnInit { | |||
104 | }) | 104 | }) |
105 | } | 105 | } |
106 | 106 | ||
107 | isUserLoggedIn () { | ||
108 | return this.authService.isLoggedIn() | ||
109 | } | ||
110 | |||
107 | toggleMenu () { | 111 | toggleMenu () { |
108 | window.scrollTo(0, 0) | 112 | window.scrollTo(0, 0) |
109 | this.isMenuDisplayed = !this.isMenuDisplayed | 113 | this.isMenuDisplayed = !this.isMenuDisplayed |