From 99e0b3b7e52b340925d5c4a234e7de4cceb4553c Mon Sep 17 00:00:00 2001 From: mohitb35 <44917347+mohitb35@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:24:14 +0530 Subject: [PATCH 1/3] chore: update @planet-sdk/common to version 0.1.47 --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1bd5fb0b..9560f835 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@mui/material": "^5.11.8", "@next/bundle-analyzer": "^10.1.3", "@paypal/react-paypal-js": "^7.8.2", - "@planet-sdk/common": "^0.1.42", + "@planet-sdk/common": "^0.1.47", "@sentry/browser": "^6.2.5", "@sentry/integrations": "^6.2.5", "@sentry/node": "^6.2.5", @@ -1812,9 +1812,9 @@ "dev": true }, "node_modules/@planet-sdk/common": { - "version": "0.1.42", - "resolved": "https://registry.npmjs.org/@planet-sdk/common/-/common-0.1.42.tgz", - "integrity": "sha512-C8rV0i3P9YyAUQlldFT91JxVpUX5rQcmKMB9IDqLKKByJ8794GTiL2y+zaJixBB1UnG/4isqyyPXTE2m1zomYg==", + "version": "0.1.47", + "resolved": "https://registry.npmjs.org/@planet-sdk/common/-/common-0.1.47.tgz", + "integrity": "sha512-ISmU8nr5k2xg1YLE4gk9vaCbCEnioA5Eoy6D2ad2X+RFxCdi2OA9xjG8bUvlHuG99yQ4WJxYCb3BlVXHdKga+g==", "dependencies": { "@types/geojson": "^7946.0.10" } @@ -10431,9 +10431,9 @@ } }, "@planet-sdk/common": { - "version": "0.1.42", - "resolved": "https://registry.npmjs.org/@planet-sdk/common/-/common-0.1.42.tgz", - "integrity": "sha512-C8rV0i3P9YyAUQlldFT91JxVpUX5rQcmKMB9IDqLKKByJ8794GTiL2y+zaJixBB1UnG/4isqyyPXTE2m1zomYg==", + "version": "0.1.47", + "resolved": "https://registry.npmjs.org/@planet-sdk/common/-/common-0.1.47.tgz", + "integrity": "sha512-ISmU8nr5k2xg1YLE4gk9vaCbCEnioA5Eoy6D2ad2X+RFxCdi2OA9xjG8bUvlHuG99yQ4WJxYCb3BlVXHdKga+g==", "requires": { "@types/geojson": "^7946.0.10" } diff --git a/package.json b/package.json index 02ab2ac6..3a3dd5a1 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@mui/material": "^5.11.8", "@next/bundle-analyzer": "^10.1.3", "@paypal/react-paypal-js": "^7.8.2", - "@planet-sdk/common": "^0.1.42", + "@planet-sdk/common": "^0.1.47", "@sentry/browser": "^6.2.5", "@sentry/integrations": "^6.2.5", "@sentry/node": "^6.2.5", From 71554b5c6e2704554539a3d5f6a542c89725a502 Mon Sep 17 00:00:00 2001 From: mohitb35 <44917347+mohitb35@users.noreply.github.com> Date: Tue, 3 Dec 2024 16:28:06 +0530 Subject: [PATCH 2/3] fix: correct typos for getFormattedCurrency / getFormattedCurrencySymbol --- src/Donations/Components/ContactsForm.tsx | 4 ++-- src/Donations/Components/DonationsForm.tsx | 10 +++++----- src/Donations/Components/PaymentsForm.tsx | 4 ++-- src/Donations/LeftPanel/TransactionSummary.tsx | 4 ++-- src/Donations/Micros/DonationAmount.tsx | 4 ++-- .../Micros/DonationTypes/BouquetDonations.tsx | 10 +++++----- .../Micros/DonationTypes/FundingDonations.tsx | 8 ++++---- src/Donations/Micros/DonationTypes/TreeDonation.tsx | 4 ++-- src/Donations/Micros/PaymentStatus/ImageComponent.tsx | 3 +-- src/Donations/Micros/PaymentStatus/ThankyouMessage.tsx | 4 ++-- src/Donations/Micros/PaymentStatus/TransferDetails.tsx | 4 ++-- src/Donations/Micros/PlanetCashSelector.tsx | 8 ++++---- src/Donations/PaymentMethods/PaymentMethodTabs.tsx | 8 ++++---- src/Utils/getFormattedCurrency.ts | 4 ++-- 14 files changed, 39 insertions(+), 40 deletions(-) diff --git a/src/Donations/Components/ContactsForm.tsx b/src/Donations/Components/ContactsForm.tsx index 069ac3d5..eccccaf0 100644 --- a/src/Donations/Components/ContactsForm.tsx +++ b/src/Donations/Components/ContactsForm.tsx @@ -12,7 +12,7 @@ import themeProperties from "../../../styles/themeProperties"; import { ThemeContext } from "../../../styles/themeContext"; import { useAuth0 } from "@auth0/auth0-react"; import { useRouter } from "next/router"; -import getFormatedCurrency from "src/Utils/getFormattedCurrency"; +import getFormattedCurrency from "src/Utils/getFormattedCurrency"; import { DONATE, PAYMENT } from "src/Utils/donationStepConstants"; import { ContactDetails } from "@planet-sdk/common"; import { AddressCandidate, GeocodeSuggestion } from "src/Common/Types/arcgis"; @@ -588,7 +588,7 @@ function ContactsForm(): ReactElement { > {paymentSetup && t("donate_button", { - totalCost: getFormatedCurrency( + totalCost: getFormattedCurrency( i18n.language, currency, paymentSetup.unitCost * quantity diff --git a/src/Donations/Components/DonationsForm.tsx b/src/Donations/Components/DonationsForm.tsx index 188ade15..6545d04b 100644 --- a/src/Donations/Components/DonationsForm.tsx +++ b/src/Donations/Components/DonationsForm.tsx @@ -2,7 +2,7 @@ import React, { ReactElement } from "react"; import { QueryParamContext } from "../../Layout/QueryParamContext"; import GiftForm from "../Micros/GiftForm"; import { useTranslation } from "next-i18next"; -import getFormatedCurrency from "../../Utils/getFormattedCurrency"; +import getFormattedCurrency from "../../Utils/getFormattedCurrency"; import { getMinimumAmountForCurrency } from "../../Utils/getExchange"; import { formatAmountForStripe } from "../../Utils/stripe/stripeHelpers"; import { NativePay } from "../PaymentMethods/PaymentRequestCustomButton"; @@ -257,7 +257,7 @@ function DonationsForm(): ReactElement { break; case "funds": paymentLabel = t("fundingPaymentLabel", { - amount: getFormatedCurrency( + amount: getFormattedCurrency( i18n.language, currency, paymentSetup.unitCost * quantity @@ -266,7 +266,7 @@ function DonationsForm(): ReactElement { break; case "planet-cash": paymentLabel = t("pcashPaymentLabel", { - amount: getFormatedCurrency( + amount: getFormattedCurrency( i18n.language, currency, paymentSetup.unitCost * quantity @@ -276,7 +276,7 @@ function DonationsForm(): ReactElement { case "bouquet": case "conservation": paymentLabel = t("bouquetPaymentLabel", { - amount: getFormatedCurrency( + amount: getFormattedCurrency( i18n.language, currency, paymentSetup.unitCost * quantity @@ -466,7 +466,7 @@ function DonationsForm(): ReactElement {
{t("minDonate")}{" "} - {getFormatedCurrency(i18n.language, currency, minAmt)} + {getFormattedCurrency(i18n.language, currency, minAmt)}
) : ( diff --git a/src/Donations/Components/PaymentsForm.tsx b/src/Donations/Components/PaymentsForm.tsx index 5e26c6d1..4a18229f 100644 --- a/src/Donations/Components/PaymentsForm.tsx +++ b/src/Donations/Components/PaymentsForm.tsx @@ -7,7 +7,7 @@ import { apiRequest } from "../../Utils/api"; import PaymentProgress from "../../Common/ContentLoaders/Donations/PaymentProgress"; import { Elements } from "@stripe/react-stripe-js"; import getStripe from "../../Utils/stripe/getStripe"; -import getFormatedCurrency from "../../Utils/getFormattedCurrency"; +import getFormattedCurrency from "../../Utils/getFormattedCurrency"; import { createDonationFunction, payDonationFunction, @@ -419,7 +419,7 @@ function PaymentsForm(): ReactElement {