Created
May 27, 2019 13:53
-
-
Save Wellers0n/1b5f90f70c6ebea7f52c292401316aa8 to your computer and use it in GitHub Desktop.
login
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
// 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