Skip to content

Commit

Permalink
feat: disables inv. gifts for "trees+m2" donations
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Oct 25, 2023
1 parent b7379c8 commit c81230e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Donations/Components/DonationsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ function DonationsForm(): ReactElement {
{/* show PlanetCashSelector only if user is signed up and have a planetCash account */}
{canPayWithPlanetCash && <PlanetCashSelector />}
{!(onBehalf && onBehalfDonor.firstName === "") &&
(projectDetails.purpose === "trees" ? (
(projectDetails.purpose === "trees" &&
(paymentSetup?.unitType !== "m2" ||
giftDetails.type === "direct") ? (
<div className="donations-gift-container mt-10">
<GiftForm />
</div>
Expand Down

0 comments on commit c81230e

Please sign in to comment.