Browse Source

🐛 Fix but when editing own user (#651)

pull/13907/head
Alejandra 1 year ago
committed by GitHub
parent
commit
4900b2e676
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      new-frontend/src/components/UserSettings/UserInformation.tsx

3
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>

Loading…
Cancel
Save