import { hideModal, showModal, login } from '../../actions';
const mapStateToProps = state => ({
isAuthenticated: !!state.user.token
});
const mapDispatchToProps = dispatch => ({
handleClose: () => {
dispatch(hideModal());
},
showRegister: () => {
dispatch(showModal('REGISTER', {}));
},
showForgot: () => {
dispatch(showModal('FORGOT', {}));
},
login: () => {
dispatch(login('....'))
}
});
export default connect(
mapStateToProps,
mapDispatchToProps
)(LoginModal);