Created
June 7, 2018 17:42
-
-
Save kmikulski/e307b81f96ec89b47c63d9a51c92aaaa to your computer and use it in GitHub Desktop.
the description for this gist
This file contains hidden or 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
| import React, { Component } from 'react'; | |
| import { withRouter } from 'react-router-dom' | |
| class Logout extends Component { | |
| logout() { | |
| this.props.history.push('/'); | |
| this.props.keycloak.logout(); | |
| } | |
| render() { | |
| return ( | |
| <button onClick={ () => this.logout() }> | |
| Logout | |
| </button> | |
| ); | |
| } | |
| } | |
| export default withRouter(Logout); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment