Skip to content

Commit

Permalink
chore(user): fixed email valitation reset form
Browse files Browse the repository at this point in the history
  • Loading branch information
RCVZ committed Aug 4, 2021
1 parent b2e0017 commit 810d104
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/ForgotPasswordForm/ForgotPasswordForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ import styles from './ForgotPasswordForm.module.scss';
type Props = {
onSubmit: React.FormEventHandler<HTMLFormElement>;
onChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement>;
onBlur: React.FocusEventHandler<HTMLInputElement | HTMLTextAreaElement>;
error?: string;
errors: FormErrors<ForgotPasswordFormData>;
value: ForgotPasswordFormData;
submitting: boolean;
};

const ForgotPasswordForm: React.FC<Props> = ({ onSubmit, onChange, value, errors, submitting }: Props) => {
const ForgotPasswordForm: React.FC<Props> = ({ onSubmit, onChange, value, errors, submitting, onBlur }: Props) => {
const { t } = useTranslation('account');

return (
Expand All @@ -29,6 +30,7 @@ const ForgotPasswordForm: React.FC<Props> = ({ onSubmit, onChange, value, errors
<TextField
value={value.email}
onChange={onChange}
onBlur={onBlur}
label={t('reset.email')}
placeholder={t('reset.email')}
error={!!errors.email || !!errors.form}
Expand Down
1 change: 1 addition & 0 deletions src/containers/AccountModal/forms/ResetPassword.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const ResetPassword: React.FC<Prop> = ({ type }: Prop) => {
onChange={emailForm.handleChange}
errors={emailForm.errors}
onSubmit={emailForm.handleSubmit}
onBlur={emailForm.handleBlur}
/>
)}
{type === 'confirmation' && (
Expand Down

0 comments on commit 810d104

Please sign in to comment.