Hide email field in profile edit modal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
SlimusMinus
2026-10-26 23:21:57 +03:00
parent 532b5b45f3
commit a2706944bd
2 changed files with 11 additions and 23 deletions

View File

@@ -99,27 +99,19 @@ function NameFieldsRow({ form, errors, onChange }) {
}
// ─── Contact fields ─────────────────────────────────────────────────────────
function ContactFields({ form, errors, onChange, onPhoneChange }) {
// Email в окне профиля не показываем: он не редактируется здесь, но остаётся
// в состоянии формы и уходит при сохранении без изменений.
function ContactFields({ form, errors, onPhoneChange }) {
const { t } = useTranslation();
return (
<>
<InputField
label={t('profile.phoneLabel')}
type="tel"
placeholder="+7 (___) ___-__-__"
value={form.phone}
error={errors.phone}
onChange={(e) => onPhoneChange(e.target.value)}
/>
<InputField
label={t('profile.emailLabel')}
type="email"
placeholder="example@email.com"
value={form.email}
error={errors.email}
onChange={(e) => onChange("email", e.target.value)}
/>
</>
<InputField
label={t('profile.phoneLabel')}
type="tel"
placeholder="+7 (___) ___-__-__"
value={form.phone}
error={errors.phone}
onChange={(e) => onPhoneChange(e.target.value)}
/>
);
}