1

May someone help me to get the name, surname etc of the current user?

I've tried this so far:

export interface IHeaderProps {
  sessionStore?: SessionStore;
}
...
 async componentDidMount() {
    await this.props.sessionStore?.getCurrentLoginInformations();
  }
...
  render() {

    const user = this.props.sessionStore?.currentLogin.user.name;

    return (

      <Avatar name={user}   />

    }
...

but it throws

sessionStore is undefined

Thanks so much.

0

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.