Skip to content

Instantly share code, notes, and snippets.

@kmikulski kmikulski/post.jsx
Created Jun 7, 2018

Embed
What would you like to do?
the description for this gist
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
You can’t perform that action at this time.