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:
parent
0259b81623
commit
bf41042ac0
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);
|
Loading…
Reference in New Issue
Block a user