From a5e0314d01a5a1f2cdba841535c6583139ad6abe Mon Sep 17 00:00:00 2001 From: rithviknishad Date: Mon, 30 Sep 2024 17:42:40 +0530 Subject: [PATCH] make code more readable --- src/Components/Patient/ManagePatients.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Components/Patient/ManagePatients.tsx b/src/Components/Patient/ManagePatients.tsx index ef70a01130f..205e5637b29 100644 --- a/src/Components/Patient/ManagePatients.tsx +++ b/src/Components/Patient/ManagePatients.tsx @@ -108,7 +108,7 @@ export const PatientManager = () => { const [phoneNumber, _setPhoneNumber] = useState(""); const [emergencyPhoneNumber, _setEmergencyPhoneNumber] = useState(""); - const setPhoneNum = (value: string) => { + const setPhoneNumber = (value: string) => { _setPhoneNumber(value); const error = PhoneNumberValidator()(value); if (value.length >= 13 && !error) { @@ -119,7 +119,7 @@ export const PatientManager = () => { } }; - const setEmergencyPhoneNum = (value: string) => { + const setEmergencyPhoneNumber = (value: string) => { _setEmergencyPhoneNumber(value); const error = PhoneNumberValidator()(value); if (value.length >= 13 && !error) { @@ -979,7 +979,7 @@ export const PatientManager = () => { label="Search by Primary Number" {...queryField("phone_number", "+91")} value={phoneNumber} - onChange={(e) => setPhoneNum(e.value)} + onChange={(e) => setPhoneNumber(e.value)} types={["mobile", "landline"]} className="w-full grow" error={((phoneNumber || "+91") === "+91" && "") || undefined} @@ -988,7 +988,7 @@ export const PatientManager = () => { label="Search by Emergency Number" {...queryField("emergency_phone_number", "+91")} value={emergencyPhoneNumber} - onChange={(e) => setEmergencyPhoneNum(e.value)} + onChange={(e) => setEmergencyPhoneNumber(e.value)} types={["mobile", "landline"]} className="w-full" error={