Created
May 27, 2019 14:03
-
-
Save Wellers0n/a7ff8be229526c0766e82e3ff4233364 to your computer and use it in GitHub Desktop.
home
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
// Home.js | |
import React from 'react' | |
const Home = ({history}) => { | |
const redirectLogin = () => { | |
localStorage.removeItem('token') | |
history.push('/') | |
} | |
return ( | |
<div> | |
<div>Home screen</div> | |
<button onClick={redirectLogin}>Remove token</button> | |
</div> | |
) | |
} | |
export default Home |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment