1
0
mirror of https://github.com/franjsco/tick3t synced 2024-12-27 09:53:37 +01:00

improvement: add Logout component

This commit is contained in:
Francesco Esposito 2019-07-31 16:08:01 +02:00
parent 0259b81623
commit bf41042ac0

34
src/containers/Logout.js Normal file
View File

@ -0,0 +1,34 @@
import React from 'react';
import { connect } from 'react-redux';
import { userActions } from './../_actions';
import Card from '../components/Card';
const Logout = (props) => {
props.logout();
return (
<div>
<Card
title="Logout"
footerLink={{ path: "/", name: "Go to home" }}
>
<p>Logout ok</p>
</Card>
</div>
);
};
const mapStateToProps = (state) => {
return {};
};
const mapDispatchToProps = (dispatch) => {
return {
logout: () => dispatch(userActions.logout()),
};
};
export default connect(mapStateToProps, mapDispatchToProps)(Logout);