File size: 449 Bytes
f5071ca
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { connect } from 'react-redux';
import LoginForm from './login_form';
import { login } from '../../actions/session_actions';
const mapStateToProps = (state,ownProps) => {
  return {
    errors: state.errors.session,
    formType: "LOGIN"

  };
};

const mapDispatchToProps = (dispatch,ownProps) => {
  return {
    processForm: (user)=> dispatch(login(user))
  };
};


export default connect(mapStateToProps , mapDispatchToProps)(LoginForm);