Browse Source

fix: disable personal information submit button if all fields are empty

develop
Apostolos Fanakis 4 years ago
parent
commit
c079c69915
Signed by: Apostolof GPG Key ID: 8600B4C4163B3269
  1. 5
      packages/concordia-app/src/views/Register/PersonalInformationStep/index.jsx

5
packages/concordia-app/src/views/Register/PersonalInformationStep/index.jsx

@ -99,6 +99,9 @@ const PersonalInformationStep = (props) => {
}
}, [error, locationInput, profilePictureInput, pushNextStep]);
const submitEnabled = useMemo(() => (profilePictureInput && profilePictureUrlValid) || locationInput,
[locationInput, profilePictureInput, profilePictureUrlValid]);
const goToHomePage = () => history.push('/');
return (
@ -154,7 +157,7 @@ const PersonalInformationStep = (props) => {
floated="right"
content={t('register.form.personal.information.step.button.submit')}
onClick={handleSubmit}
disabled={!profilePictureUrlValid}
disabled={!submitEnabled}
/>
<Button
className="skip-button"

Loading…
Cancel
Save