Skip to content

Instantly share code, notes, and snippets.

@Wellers0n
Created May 27, 2019 13:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wellers0n/1b5f90f70c6ebea7f52c292401316aa8 to your computer and use it in GitHub Desktop.
Save Wellers0n/1b5f90f70c6ebea7f52c292401316aa8 to your computer and use it in GitHub Desktop.
login
// Login.js
import React from 'react'
const Login = ({history}) => {
const loginIn = () => {
localStorage.setItem('token', 'batman')
history.push('/home')
}
return (
<div>
<div>Login screen</div>
<button onClick={loginIn}>Go Home</button>
</div>
)
}
export default Login
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment