Commit b4902c36 authored by ncastejon's avatar ncastejon
Browse files

Fix issue #153 - Display correctly Drafts if logged in or logged out

parent f0c9ff03
Pipeline #1775 passed with stages
in 5 minutes and 1 second
......@@ -62,7 +62,7 @@ export class HeaderComponent implements OnInit {
signOut() {
this._userService.resetAuth();
this.closeUserDropdown();
this._router.navigate(['/', AppRoutes.signin.uri]);
this._router.navigate(['/', AppRoutes.home.uri]);
}
closeUserDropdown() {
......
......@@ -52,7 +52,7 @@ export class SideMenuComponent implements OnInit, OnDestroy {
this.subscriptions.push(
this._userService.userStatusChanged$.subscribe((isLogged) => {
this.displayAdminBar = isLogged;
this.displayAdminBar = false;
this.getDrafts();
}),
);
......
......@@ -41,9 +41,10 @@ export class UserService {
}
resetAuth() {
this.logout().subscribe();
this._user = null;
this._userStatusChangedSubject.next(false);
this.logout().subscribe(() => {
this._user = null;
this._userStatusChangedSubject.next(false);
});
}
get user() {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment