Skip to content

Commit

Permalink
fix: minor code cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mohitb35 committed Nov 18, 2024
1 parent 448c65d commit fb98cd9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/Donations/Micros/GiftForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ export default function GiftForm(): ReactElement {
recipientName: giftDetails.recipientName || "",
recipientEmail:
(giftDetails.type === "invitation" && giftDetails.recipientEmail) || "",
message:
(giftDetails.type === "invitation" && giftDetails.recipientName) || "",
message: (giftDetails.type === "invitation" && giftDetails.message) || "",
};

const {
Expand Down
5 changes: 1 addition & 4 deletions src/Donations/Micros/PaymentStatus/ThankyouMessage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,7 @@ function ThankyouMessage({
// EXAMPLE: We've sent an email to Sagar Aryal about the gift.
// TO DO - if recipientEmail is not present, then show message - You will receive the Gift certificate for {{recipientName}} on your email
const donationGiftMessage =
donation &&
donation.gift &&
donation.gift.type === "invitation" &&
donation.gift.recipientEmail //TODOO - address TS warnings after /donations is updated to send gift data
donation?.gift?.type === "invitation" && donation.gift.recipientEmail //TODOO - address TS warnings after /donations is updated to send gift data
? " " +
t("common:giftSentMessage", {
recipientName: donation.gift.recipientName,
Expand Down

0 comments on commit fb98cd9

Please sign in to comment.