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
<h1 align="center"> | |
<br> | |
<img src="YOUR_LOGO_URL" alt="YOUR_PROJECT_NAME" width="120"> | |
<br> | |
<br> | |
YOUR_PROJECT_NAME | |
</h1> | |
<p align="center">A little description about your project</p> |
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
<h1 align="center"> | |
<br> | |
<img src="YOUR_LOGO_URL" alt="YOUR_PROJECT_NAME" width="120"> | |
<br> | |
<br> | |
YOUR_PROJECT_NAME | |
</h1> | |
<p align="center">A little description about your project</p> |
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
# Dependências Necessárias | |
## Mac OS | |
brew tap AdoptOpenJDK/openjdk | |
brew cask install adoptopenjdk8 | |
## Windows | |
choco install -y python2 jdk8 |
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
const mongoose = require('mongoose'); | |
mongoose.connect( | |
`mongodb://<db_username>:<db_password><db_port>:<db_port>/<db_name>`, | |
{ useNewUrlParser: true }, | |
); |
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 { Base64 } from 'js-base64'; | |
import { call, put, takeLatest } from 'redux-saga/effects'; | |
import * as actions from '../actions/authActions'; | |
import * as types from '../actions/types'; | |
import * as API from '../api/authApi'; | |
import DeviceStorage from '../utils/deviceStorage'; | |
import * as NavigationService from '../utils/navigationService'; | |
import * as routes from '../utils/routeTypes'; | |
export function* login({ payload }) { |
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
<style> | |
html, body { | |
height: 100%; | |
} | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
background: #009587; | |
} |
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
const styles = { | |
container: { | |
display: 'flex', | |
textAlign: 'center', | |
flexDirection: 'column', | |
minWidth: '300px', | |
boxShadow: 'rgba(0, 0, 0, 0.1) 0px 0px 20px', | |
background: 'rgb(255, 255, 255)', | |
borderRadius: '4px', | |
padding: '30px 20px' |
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, { Component } from 'react' | |
class Welcome extends Component { | |
handleSubmit = (e) => { | |
e.preventDefault(); | |
const username = e.target.elements.username.value; | |
localStorage.setItem('@welcome-app/username', username); | |
window.location.reload(); | |
} |
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
handleSubmit = (e) => { | |
e.preventDefault(); | |
const username = e.target.elements.username.value; | |
localStorage.setItem('@welcome-app/username', username); | |
window.location.reload(); | |
} | |
handleLogout = () => { | |
localStorage.removeItem('@welcome-app/username'); | |
window.location.reload(); |
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 username = localStorage.getItem('@welcome-app/username'); | |
if (username !== null) { | |
return ( | |
<div style={styles.container}> | |
<p>Bem vindo {username}</p> | |
<button onClick={this.handleLogout} style={styles.submitButton}>Sair</button> | |
</div> | |
); | |
} |
NewerOlder