Alejandra
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
1 deletions
-
new-frontend/src/components/UserSettings/UserInformation.tsx
|
|
@ -29,6 +29,7 @@ const UserInformation: React.FC = () => { |
|
|
|
register, |
|
|
|
handleSubmit, |
|
|
|
reset, |
|
|
|
getValues, |
|
|
|
formState: { isSubmitting, errors, isDirty }, |
|
|
|
} = useForm<UserOut>({ |
|
|
|
mode: 'onBlur', |
|
|
@ -128,7 +129,7 @@ const UserInformation: React.FC = () => { |
|
|
|
onClick={toggleEditMode} |
|
|
|
type={editMode ? 'button' : 'submit'} |
|
|
|
isLoading={editMode ? isSubmitting : false} |
|
|
|
isDisabled={editMode ? !isDirty : false} |
|
|
|
isDisabled={editMode ? !isDirty || !getValues('email') : false} |
|
|
|
> |
|
|
|
{editMode ? 'Save' : 'Edit'} |
|
|
|
</Button> |
|
|
|