ice-frontend-react-mobx
Version:
ICE Frontend REACT+MobX
22 lines (18 loc) • 411 B
JavaScript
import React from 'react';
import { inject, observer } from 'mobx-react';
export default class Logout extends React.Component {
constructor (props) {
super(props);
this.store = this.props.store.authStore;
}
componentWillMount () {
this.store.signout();
}
componentDidMount () {
this.props.store.history.push('/');
}
render () {
return null;
}
}