Last active
May 30, 2019 16:24
render() for part 2 of blockstack tutorial
This file contains 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 { userSession, currentUser } = this.state; | |
return ( | |
<div className="App"> | |
{userSession.isUserSignedIn() ? ( | |
<div className="hello"> | |
<h2>Hello {currentUser.username} !</h2> | |
<button className="button" onClick={this.handleSignOut}> | |
<strong>Sign Out</strong> | |
</button> | |
</div> | |
) : ( | |
<button className="button" onClick={this.handleSignIn}> | |
<strong>Sign In</strong> | |
</button> | |
)} | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment