From 59032dd285016dd883df933869792834663e1e19 Mon Sep 17 00:00:00 2001 From: Koosha Lahouti Date: Wed, 20 Aug 2025 01:04:17 +0330 Subject: [PATCH] fix: toast in phone number section --- .../profile/components/userInformation/PhoneNumber.tsx | 4 ++++ .../userInformation/phoneNumber/PhoneEditForm.tsx | 6 ------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/features/profile/components/userInformation/PhoneNumber.tsx b/src/features/profile/components/userInformation/PhoneNumber.tsx index 2ff5f75..aa8c505 100644 --- a/src/features/profile/components/userInformation/PhoneNumber.tsx +++ b/src/features/profile/components/userInformation/PhoneNumber.tsx @@ -174,6 +174,10 @@ export function PhoneNumber() { const handleBlur = () => { setTouched(true); if (!phoneNumber) { + toast({ + message: t('settingForm.phoneNumberIsInvalid'), + severity: 'error', + }); setFormError(t('settingForm.thisFieldIsRequired')); return; } diff --git a/src/features/profile/components/userInformation/phoneNumber/PhoneEditForm.tsx b/src/features/profile/components/userInformation/phoneNumber/PhoneEditForm.tsx index 2ecf6c1..4e20ab5 100644 --- a/src/features/profile/components/userInformation/phoneNumber/PhoneEditForm.tsx +++ b/src/features/profile/components/userInformation/phoneNumber/PhoneEditForm.tsx @@ -137,12 +137,6 @@ export default function PhoneEditForm({ } } }} - disabled={ - isSending || - buttonState === 'counting' || - phoneNumber.length === 0 || - !isValidPhoneNumber(phoneNumber) - } sx={{ whiteSpace: 'nowrap', color: 'primary.main',