-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added user name #66
added user name #66
Conversation
src/app/header/header.component.ts
Outdated
} | ||
|
||
ngOnInit(): void { | ||
this.store.dispatch(new CheckAuth()) | ||
this.store.dispatch(new CheckAuth()); | ||
this.isAuthorized$.subscribe(name => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this logic under checkAuth action
@@ -22,9 +25,13 @@ export class UserRegistrationState { | |||
public http: HttpClient) {} | |||
|
|||
@Selector() | |||
static isAuthorized(state: UserRegistrationStateModel) { | |||
static isAuthorized(state: UserRegistrationStateModel): any { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe it is boolean
return state.isAuthorized; | ||
} | ||
@Selector() | ||
static userName(state: UserRegistrationStateModel): any { | ||
return state.userName; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
string
<mat-icon class="icon-message"> email</mat-icon> | ||
</i> | ||
</button> | ||
|
||
<button mat-button [matMenuTriggerFor]="log"> | ||
<h1>{{user.firstName}}</h1> | ||
<h1>{{userName$ | async}}</h1> | ||
</button> | ||
<mat-menu #log="matMenu"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add role support
No description provided.