Skip to content

Instantly share code, notes, and snippets.

View joaovitorzv's full-sized avatar
:shipit:
ayo

João Vitor joaovitorzv

:shipit:
ayo
View GitHub Profile
@joaovitorzv
joaovitorzv / Faze 3
Last active December 30, 2017 02:07
Fase 3
http://www.mediafire.com/file/dvr9a8yaez0c2sf/Final.rar
{
"cars": [
{
"id": 1,
"image": "https://upload.wikimedia.org/wikipedia/commons/9/92/2017_Tesla_Model_X_100D_Front.jpg",
"label": "Tesla model X",
"description": "Tesla is a car that can increase the world life and update you lifestyle"
},
{
"id": 2,
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
import React from 'react';
import { FormContainer } from '../../global';
export default function Register() {
return (
<FormContainer>
<h1>Register</h1>
<form>
<input type="text" placeholder="Full name"/>
import styled from 'styled-components';
export const FormContainer = styled.div`
max-width: 800px;
margin: 0 auto;
form {
border-top: 1px solid rgb(214, 214, 214);
display: flex;
flex-direction: column;
const validationSchema = Yup.object().shape({
name: Yup.string().required('Name is required'),
email: Yup.string().email('Put a valid email').required('Email is required),
password: Yup.string().min(6).required('Password is required'),
password_confirmation: Yup.string()
.required('Password confirmation is required')
.oneOf([Yup.ref('password'), null], 'Password not match')
});
<Formik
validationSchema={validationSchema}
initialValues={{
name: '',
email: '',
password: '',
confirm_password: '',
}}
onSubmit={handleSubmit}
>
({ handleSubmit, handleChange, values, touched, isSubmitting, errors }) => (
<form onSubmit={handleSubmit}>
<input type="text" placeholder="Full name"/>
<input type="text" placeholder="Email" />
<input type="password" placeholder="Password" />
<input type="password" placeholder="Confirm password" />
<button type="submit">
Create account
</button>
{({ handleSubmit, handleChange, values, touched, isSubmitting, errors, handleBlur }) => (
<form onSubmit={handleSubmit}>
<input
name="name"
onChange={handleChange}
value={values.name}
type="text"
placeholder="Full name"
/>
export const ErrorText = styled.p`
color: red;
font-size: .8em;
margin-top: 0;
`;