-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Front End do App 😎
- Loading branch information
Showing
29 changed files
with
14,674 additions
and
297 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,14 @@ | ||
import React from 'react'; | ||
import logo from './logo.svg'; | ||
import './App.css'; | ||
|
||
import './Global.css' | ||
|
||
import Routes from './routes' | ||
|
||
function App() { | ||
|
||
return ( | ||
<div className="App"> | ||
<header className="App-header"> | ||
<img src={logo} className="App-logo" alt="logo" /> | ||
<p> | ||
Hello OmniStack | ||
</p> | ||
<a | ||
className="App-link" | ||
href="https://reactjs.org" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Learn React | ||
</a> | ||
</header> | ||
</div> | ||
); | ||
<Routes/> | ||
); | ||
} | ||
|
||
export default App; |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap'); | ||
|
||
*{ | ||
margin: 0; | ||
padding: 0; | ||
outline: 0; | ||
box-sizing: border-box; | ||
} | ||
|
||
body{ | ||
font: 400 14px Roboto, sans-serif; | ||
background: #f0f0f5; | ||
-webkit-font-smoothing: antialised; | ||
} | ||
|
||
input, button, textarea{ | ||
font: 400 18px Roboto, sans-serif; | ||
} | ||
|
||
button{ | ||
cursor: pointer; | ||
} | ||
|
||
|
||
form input{ | ||
width: 100%; | ||
height: 60px; | ||
color: #333; | ||
border: 1px solid #dcdce6; | ||
border-radius: 8px; | ||
padding: 0 24px; | ||
} | ||
|
||
form textarea{ | ||
width: 100%; | ||
min-height: 140px; | ||
height: 60px; | ||
color: #333; | ||
border: 1px solid #dcdce6; | ||
border-radius: 8px; | ||
padding: 16px 24px; | ||
line-height: 24px; | ||
resize: vertical; | ||
} | ||
|
||
.button{ | ||
width: 100%; | ||
height: 60px; | ||
background-color: #e02041; | ||
border: 0; | ||
border-radius: 8px; | ||
color: #fff; | ||
font-weight: 700; | ||
margin-top: 6px; | ||
display: inline-block; | ||
text-align: center; | ||
text-decoration: none; | ||
font-size: 18px; | ||
line-height: 60px; | ||
transition: filter s.2s; | ||
} | ||
|
||
.button:hover{ | ||
filter: brightness(90%); | ||
} | ||
|
||
.back-link{ | ||
display: flex; | ||
align-items: center; | ||
margin-top: 40px; | ||
color: #41414d; | ||
font-size: 18px; | ||
text-decoration: none; | ||
font-weight: 500; | ||
transition: opacity 0.2; | ||
} | ||
|
||
.back-link:hover{ | ||
opacity: 0.8; | ||
} | ||
|
||
.back-link svg{ | ||
margin-right: 8px; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
|
||
|
||
export default function Header({ children }){ | ||
return ( | ||
<header> | ||
<h1>{ children }</h1> | ||
</header> | ||
) | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,10 @@ | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import './index.css'; | ||
import App from './App'; | ||
import * as serviceWorker from './serviceWorker'; | ||
|
||
ReactDOM.render( | ||
<React.StrictMode> | ||
<App /> | ||
</React.StrictMode>, | ||
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. | ||
// Learn more about service workers: https://bit.ly/CRA-PWA | ||
serviceWorker.unregister(); |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React, { useState } from 'react' | ||
import { Link, useHistory } from 'react-router-dom' | ||
import { FiLogIn } from 'react-icons/fi' | ||
|
||
import api from '../../services/api' | ||
|
||
import './styles.css' | ||
|
||
import logo from '../../assets/logo.svg' | ||
import heroesImg from '../../assets/heroes.png' | ||
|
||
|
||
|
||
export default function Logon() { | ||
const [id, setId] = useState('') | ||
|
||
const history = useHistory() | ||
|
||
async function handleLogin(e) { | ||
e.preventDefault() | ||
|
||
try { | ||
const response = await api.post('sessions', { id }) | ||
console.log(response.data.name) | ||
|
||
localStorage.setItem('ongId', id) | ||
localStorage.setItem('ongName', response.data.name) | ||
|
||
history.push('/profile') | ||
} catch (error) { | ||
alert("Falha no login, tente novamente") | ||
} | ||
} | ||
|
||
return ( | ||
<div className="logon-container"> | ||
<section className="form"> | ||
<img src={logo} alt="Be The Hero" /> | ||
<form onSubmit={handleLogin}> | ||
<h1>Faça seu logon</h1> | ||
|
||
<input | ||
placeholder="Sua ID" | ||
value={id} | ||
onChange={e => setId(e.target.value)} | ||
/> | ||
<button className="button" type="submit">Entrar</button> | ||
|
||
<Link className="back-link" to="/register"> | ||
<FiLogIn size={16} color="#e02041" /> | ||
Não tenho cadastro | ||
</Link> | ||
</form> | ||
</section> | ||
<img src={heroesImg} alt="Heroes" /> | ||
</div> | ||
) | ||
} |
Oops, something went wrong.