From f2574c10ffdd9460f9b2ec8f891f39acb23379ec Mon Sep 17 00:00:00 2001 From: mohitb35 <44917347+mohitb35@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:58:54 +0530 Subject: [PATCH] refactor: minor refactors to address codefactor feedback - removes unnecessary `true &&...` expression - refactors onClick handler for currency selector in TreeDonations --- src/Donations/Components/ContactsForm.tsx | 44 +++++++++---------- .../Micros/DonationTypes/TreeDonation.tsx | 2 +- 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/src/Donations/Components/ContactsForm.tsx b/src/Donations/Components/ContactsForm.tsx index eccccaf0..d54da170 100644 --- a/src/Donations/Components/ContactsForm.tsx +++ b/src/Donations/Components/ContactsForm.tsx @@ -401,29 +401,27 @@ function ContactsForm(): ReactElement {
- {true && ( - ( - - )} - /> - )} + ( + + )} + /> {errors.zipCode !== undefined && (
{errors.zipCode.message}
)} diff --git a/src/Donations/Micros/DonationTypes/TreeDonation.tsx b/src/Donations/Micros/DonationTypes/TreeDonation.tsx index 5a1d0020..891964d7 100644 --- a/src/Donations/Micros/DonationTypes/TreeDonation.tsx +++ b/src/Donations/Micros/DonationTypes/TreeDonation.tsx @@ -152,7 +152,7 @@ function TreeDonation({ setopenCurrencyModal }: Props): ReactElement {