import PropTypes from 'prop-types'; import React from 'react'; import { withTranslation } from 'react-i18next'; import { domOnlyProps } from '../../../utils/reduxFormUtils'; import Button from '../../../common/Button'; function SignupForm(props) { const { fields: { username, /* email, */ password, confirmPassword }, handleSubmit, submitting, invalid, pristine, } = props; return (

{username.touched && username.error && ( {username.error} )}

{/*

{email.touched && email.error && ( {email.error} )}

*/}

{password.touched && password.error && ( {password.error} )}

{confirmPassword.touched && confirmPassword.error && ( {confirmPassword.error} )}

); } SignupForm.propTypes = { fields: PropTypes.shape({ username: PropTypes.object.isRequired, // eslint-disable-line // email: PropTypes.object.isRequired, // eslint-disable-line password: PropTypes.object.isRequired, // eslint-disable-line confirmPassword: PropTypes.object.isRequired, // eslint-disable-line }).isRequired, handleSubmit: PropTypes.func.isRequired, signUpUser: PropTypes.func.isRequired, submitting: PropTypes.bool, invalid: PropTypes.bool, pristine: PropTypes.bool, previousPath: PropTypes.string.isRequired, t: PropTypes.func.isRequired }; SignupForm.defaultProps = { submitting: false, pristine: true, invalid: false, }; export default withTranslation()(SignupForm);