diff --git a/corn-frontend/src/app/pages/boards/boards.component.ts b/corn-frontend/src/app/pages/boards/boards.component.ts index 8c7cf712..c2a85ff4 100644 --- a/corn-frontend/src/app/pages/boards/boards.component.ts +++ b/corn-frontend/src/app/pages/boards/boards.component.ts @@ -65,9 +65,11 @@ export class BoardsComponent implements OnInit { } }); this.isLoggedIn = this.keycloak.isLoggedIn(); + if (this.isLoggedIn) { this.userProfile = await this.keycloak.loadUserProfile(); - console.log(this.userProfile); + } else { + this.router.navigate([RouterPaths.HOME_DIRECT_PATH]); } } @@ -88,7 +90,8 @@ export class BoardsComponent implements OnInit { } logout(): void { - this.keycloak.logout(); + this.keycloak + .logout(); } }