Last active
April 19, 2019 11:20
-
-
Save yuyasugano/d33018ab85e58767018422ebe38f0737 to your computer and use it in GitHub Desktop.
Blockstack application React User Status
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | |
| | |
<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