You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
587 B
JavaScript
25 lines
587 B
JavaScript
import { bindActionCreators } from 'redux';
|
|
import { connect } from 'react-redux';
|
|
|
|
import { clearUserCreateError, createUser } from '../actions/entry';
|
|
import AddUserPopup from '../components/AddUserPopup';
|
|
|
|
const mapStateToProps = ({ userCreateForm: { data: defaultData, isSubmitting, error } }) => ({
|
|
defaultData,
|
|
isSubmitting,
|
|
error,
|
|
});
|
|
|
|
const mapDispatchToProps = (dispatch) => bindActionCreators(
|
|
{
|
|
onCreate: createUser,
|
|
onMessageDismiss: clearUserCreateError,
|
|
},
|
|
dispatch,
|
|
);
|
|
|
|
export default connect(
|
|
mapStateToProps,
|
|
mapDispatchToProps,
|
|
)(AddUserPopup);
|