From c81230e88ea1db1325c44498463ef71735523515 Mon Sep 17 00:00:00 2001 From: mohitb35 <44917347+mohitb35@users.noreply.github.com> Date: Wed, 25 Oct 2023 18:09:57 +0530 Subject: [PATCH] feat: disables inv. gifts for "trees+m2" donations --- src/Donations/Components/DonationsForm.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Donations/Components/DonationsForm.tsx b/src/Donations/Components/DonationsForm.tsx index 03f6f704..f9e26fe4 100644 --- a/src/Donations/Components/DonationsForm.tsx +++ b/src/Donations/Components/DonationsForm.tsx @@ -340,7 +340,9 @@ function DonationsForm(): ReactElement { {/* show PlanetCashSelector only if user is signed up and have a planetCash account */} {canPayWithPlanetCash && } {!(onBehalf && onBehalfDonor.firstName === "") && - (projectDetails.purpose === "trees" ? ( + (projectDetails.purpose === "trees" && + (paymentSetup?.unitType !== "m2" || + giftDetails.type === "direct") ? (