Skip to content

Instantly share code, notes, and snippets.

View CarlosLevir's full-sized avatar
🔥
Showtime!

Carlos Levir CarlosLevir

🔥
Showtime!
View GitHub Profile
<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>
<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>
# Dependências Necessárias
## Mac OS
brew tap AdoptOpenJDK/openjdk
brew cask install adoptopenjdk8
## Windows
choco install -y python2 jdk8
const mongoose = require('mongoose');
mongoose.connect(
`mongodb://<db_username>:<db_password><db_port>:<db_port>/<db_name>`,
{ useNewUrlParser: true },
);
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 }) {
<style>
html, body {
height: 100%;
}
body {
display: flex;
justify-content: center;
align-items: center;
background: #009587;
}
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'
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();
}
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();
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>
);
}