This repository has been archived on 2023-12-22. You can view files and clone it, but cannot push or open issues or pull requests.
old-monorepo/Dashboard/app/renderer/containers/LoggedInPage.js

21 lines
555 B
JavaScript

import { connect } from 'react-redux';
import { push } from 'connected-react-router';
import { bindActionCreators } from 'redux';
import LoggedIn from '../components/LoggedIn';
import userActions from '../actions/user';
const mapStateToProps = (state) => {
return state;
};
const mapDispatchToProps = (dispatch) => {
const user = bindActionCreators(userActions, dispatch);
return {
onLogout: (data) => {
user.logout(data);
dispatch(push('/'));
},
};
};
export default connect(mapStateToProps, mapDispatchToProps)(LoggedIn);