2019-08-31 04:07:25 +05:00
|
|
|
import { bindActionCreators } from 'redux';
|
|
|
|
import { connect } from 'react-redux';
|
|
|
|
|
2019-10-18 08:06:34 +05:00
|
|
|
import { authenticate, clearAuthenticateError } from '../actions/entry';
|
2019-08-31 04:07:25 +05:00
|
|
|
import Login from '../components/Login';
|
|
|
|
|
2019-10-18 08:06:34 +05:00
|
|
|
const mapStateToProps = ({ authenticateForm: { data: defaultData, isSubmitting, error } }) => ({
|
|
|
|
defaultData,
|
|
|
|
isSubmitting,
|
|
|
|
error,
|
|
|
|
});
|
2019-08-31 04:07:25 +05:00
|
|
|
|
2020-03-25 00:15:47 +05:00
|
|
|
const mapDispatchToProps = (dispatch) =>
|
2020-02-03 18:42:31 +05:00
|
|
|
bindActionCreators(
|
|
|
|
{
|
|
|
|
onAuthenticate: authenticate,
|
|
|
|
onMessageDismiss: clearAuthenticateError,
|
|
|
|
},
|
|
|
|
dispatch,
|
|
|
|
);
|
2019-08-31 04:07:25 +05:00
|
|
|
|
2020-02-03 18:42:31 +05:00
|
|
|
export default connect(mapStateToProps, mapDispatchToProps)(Login);
|