ampache_react/app/views/LogoutPage.jsx

31 lines
639 B
React
Raw Normal View History

// 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";
// Actions
2016-07-07 23:23:18 +02:00
import * as actionCreators from "../actions";
/**
* Logout page
*/
2016-07-07 23:23:18 +02:00
export class LogoutPage extends Component {
componentWillMount() {
// Logout when component is mounted
2016-07-07 23:23:18 +02:00
this.props.actions.logoutAndRedirect();
}
render() {
2016-07-07 23:23:18 +02:00
return (
<div></div>
2016-07-07 23:23:18 +02:00
);
}
}
const mapDispatchToProps = (dispatch) => ({
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);