Skip to content

Commit

Permalink
feat: subimitted
Browse files Browse the repository at this point in the history
  • Loading branch information
int-tt committed Oct 21, 2019
1 parent c5176eb commit a425880
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 24 deletions.
49 changes: 30 additions & 19 deletions src/App.js
@@ -1,26 +1,37 @@
import React from 'react';
import logo from './logo.svg';
import React, { useState } from 'react';
// import logo from './logo.svg';
import './App.css';

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
const [submitted, setSubmitted] = useState(false)
const content = submitted ? (
<p>
Thanks for joining in!<br />
When we're ready to wow you, <br />
You'll get an email.
</p>
) : (
<form onSubmit={() => setSubmitted(true)}>
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
A social network, <br />
Where you are the customer. <br />
Ad free. Launching soon.
</p>
<label>
Name:
<input value='' />
</label>
<label>
Email:
<input value='' />
</label>
<button type="submit">
I'll vouch for that
</button>
</form>
)

return <div className="App">{content}</div>
}

export default App;
16 changes: 13 additions & 3 deletions src/index.css
Expand Up @@ -7,7 +7,17 @@ body {
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
.App {
text-align: center;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: calc(10px + 2vmin);
}

.App label {
display: block;
margin: 1rem 0;
}
3 changes: 1 addition & 2 deletions src/index.js
Expand Up @@ -2,9 +2,8 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import * as serviceWorker from './serviceWorker';

ReactDOM.render( < App / > , document.getElementById('root'));
ReactDOM.render(< App />, document.getElementById('root'));

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
Expand Down

0 comments on commit a425880

Please sign in to comment.