Skip to content

Instantly share code, notes, and snippets.

@Wellers0n
Created May 27, 2019 14:03
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/a7ff8be229526c0766e82e3ff4233364 to your computer and use it in GitHub Desktop.
Save Wellers0n/a7ff8be229526c0766e82e3ff4233364 to your computer and use it in GitHub Desktop.
home
// 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