blob: bcc3bcebd79b8919ac3572b0a814b622df38e6ff (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
import { h, Component } from 'preact';
// import PropTypes from 'prop-types';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { Redirect } from 'react-router-dom';
import * as authActions from './auth.actions';
class Logout extends Component {
componentWillMount(props){
this.props.actions.logout()
}
render(){
return <Redirect to="/" />
}
}
const mapStateToProps = (state) => ({
});
const mapDispatchToProps = (dispatch) => ({
actions: bindActionCreators(authActions, dispatch)
});
export default connect(mapStateToProps, mapDispatchToProps)(Logout);
|