import { connect } from 'react-redux';

import { checkEmailAvailability, checkNomAvailability, registerUser } from '../actions/profile.js';

import Register from './Register.js';

const mapDispatchToProps = (dispatch) => ({
    checkEmail: (email) => dispatch(checkEmailAvailability(email)),
    checkNomDeBid: (nomDeBid) => dispatch(checkNomAvailability(nomDeBid)),
    doRegistration: (user) => dispatch(registerUser(user)),
});

export default connect(
    null,
    mapDispatchToProps,
)(Register);
