Last active
July 9, 2021 20:28
-
-
Save chriscorcoran/a307e9d423ea6b90d449da3eabd006f3 to your computer and use it in GitHub Desktop.
Creating the UI
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
import { Container, Form, Button } from "react-bootstrap"; | |
function App() { | |
return ( | |
<div className="App"> | |
<Container> | |
<h2>Lets JaaS It Up</h2> | |
<Form | |
style={{ display: allowed ? "none" : "block" }}> | |
<Form.Group> | |
<Form.Label htmlFor="email"> | |
Email Address | |
</Form.Label> | |
<Form.Control | |
value={email} | |
onChange={(e) => setEmail(e.target.value)} /> | |
</Form.Group> | |
<Button variant="primary" type="submit">Join</Button> | |
</Form> | |
<div style={{ display: allowed ? "block" : "none" }}> | |
<div id="jaas-container" style={{height: "700px"}}></div> | |
</div> | |
</Container> | |
</div> | |
); | |
} |
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
import React, { useState, useEffect } from "react"; | |
import { Container, Form, Button } from "react-bootstrap"; | |
function App() { | |
// Setup our Hooks to manage state | |
const [email, setEmail] = useState(""); | |
const [allowed, setAllowed] = useState(false); | |
return ( | |
<div className="App"> | |
<Container> | |
<h2>Lets JaaS It Up</h2> | |
<Form | |
style={{ display: allowed ? "none" : "block" }}> | |
<Form.Group> | |
<Form.Label htmlFor="email"> | |
Email Address | |
</Form.Label> | |
<Form.Control | |
value={email} | |
onChange={(e) => setEmail(e.target.value)} /> | |
</Form.Group> | |
<Button variant="primary" type="submit">Join</Button> | |
</Form> | |
<div style={{ display: allowed ? "block" : "none" }}> | |
<div id="jaas-container" style={{height: "700px"}}></div> | |
</div> | |
</Container> | |
</div> | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment