Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Last active April 19, 2019 11:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuyasugano/d33018ab85e58767018422ebe38f0737 to your computer and use it in GitHub Desktop.
Save yuyasugano/d33018ab85e58767018422ebe38f0737 to your computer and use it in GitHub Desktop.
Blockstack application React User Status
render() {
const { handleSignOut } = this.props;
const { person } = this.state;
const { username } = this.state;
return (
!isSignInPending() && person ?
<div className="container">
<div className="row">
<div className="col-md-offset-3 col-md-6">
<div className="col-md-12">
<div className="avatar-section">
<img src={ person.avatarUrl() ? person.avatarUrl() : avatarFallbackImage } className="img-rounded avatar" id="avatar-image" />
<div className="username">
<h1>
<span id="heading-name">{ person.name() ? person.name() : 'Nameless Person' }</span>
</h1>
<span>{username}</span>
<span>
&nbsp;|&nbsp;
<a onClick={ handleSignOut.bind(this) }>(Logout)</a>
</span>
</div>
</div>
</div>
<div className="new-status">
<div className="col-md-12">
<textarea className="input-status" value={this.state.newPost} onChange={e => this.handleNewPostChange(e)} placeholder="Enter a " />
</div>
<div className="col-md-12">
<button className="btn btn-primary btn-lg" onClick={e => this.handleNewPostSubmit(e)}>
Submit a post
</button>
</div>
</div>
</div>
</div>
</div> : null
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment