mirror of
https://github.com/franjsco/tick3t
synced 2025-06-05 22:19:18 +02:00
improvement: add Logout component
This commit is contained in:
34
src/containers/Logout.js
Normal file
34
src/containers/Logout.js
Normal 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);
|
Reference in New Issue
Block a user