Created
January 13, 2021 16:34
-
-
Save polluterofminds/c442a08e46ff3c9b7268fbb5dedf4c75 to your computer and use it in GitHub Desktop.
Conditionally render home page
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
{loggedIn ? ( | |
<PostList /> | |
) : ( | |
<div style={styles.flex}> | |
<Image | |
width="80px" | |
height="80px" | |
src="/pinnie.svg" | |
alt="Pinnie the pinata" | |
/> | |
<h1>Pinnie For Your Thoughts</h1> | |
<p>Where Web3 meets Web2.</p> | |
<div style={styles.flexRow}> | |
<form onSubmit={handleSubscribe}> | |
<input | |
style={styles.input} | |
onChange={(e) => setEmail(e.target.value)} | |
value={email} | |
type="email" | |
placeholder="Type your email" | |
/> | |
<button type="submit" style={styles.btn}> | |
Subscribe | |
</button> | |
</form> | |
</div> | |
<div> | |
<p style={styles.error}>{errorMessage}</p> | |
<p style={styles.success}>{successMessage}</p> | |
</div> | |
<div style={styles.sample}> | |
<Link href="/samples/QmPEEogbDouMH8bVSt9K2Tyzg98ACzhZ3cszYhwh7bfWXN"> | |
Read a Sample First | |
</Link> | |
</div> | |
</div> | |
)} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment