2016-08-10 21:36:11 +02:00
|
|
|
// NPM imports
|
2016-08-06 17:25:56 +02:00
|
|
|
import React, { Component } from "react";
|
2016-07-07 23:23:18 +02:00
|
|
|
import { bindActionCreators } from "redux";
|
|
|
|
import { connect } from "react-redux";
|
|
|
|
|
2016-08-10 21:36:11 +02:00
|
|
|
// Actions
|
2016-07-07 23:23:18 +02:00
|
|
|
import * as actionCreators from "../actions";
|
|
|
|
|
2016-08-10 21:36:11 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Logout page
|
|
|
|
*/
|
2016-07-07 23:23:18 +02:00
|
|
|
export class LogoutPage extends Component {
|
2016-08-10 23:50:23 +02:00
|
|
|
componentWillMount() {
|
2016-08-10 21:36:11 +02:00
|
|
|
// Logout when component is mounted
|
2016-07-07 23:23:18 +02:00
|
|
|
this.props.actions.logoutAndRedirect();
|
|
|
|
}
|
|
|
|
|
2016-08-10 23:50:23 +02:00
|
|
|
render() {
|
2016-07-07 23:23:18 +02:00
|
|
|
return (
|
2016-08-05 00:00:25 +02:00
|
|
|
<div></div>
|
2016-07-07 23:23:18 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const mapDispatchToProps = (dispatch) => ({
|
2016-08-10 23:50:23 +02:00
|
|
|
actions: bindActionCreators(actionCreators, dispatch),
|
2016-07-07 23:23:18 +02:00
|
|
|
});
|
|
|
|
|
2016-07-25 23:22:44 +02:00
|
|
|
export default connect(null, mapDispatchToProps)(LogoutPage);
|