From fc0621b6352b649b2a2076d6f10997ec2ce6ee17 Mon Sep 17 00:00:00 2001 From: Sam Poder Date: Mon, 16 Sep 2024 19:34:35 -0500 Subject: [PATCH] Fix decimal issue --- src/pages/organization/Donation.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/organization/Donation.tsx b/src/pages/organization/Donation.tsx index ea91963..a36b639 100644 --- a/src/pages/organization/Donation.tsx +++ b/src/pages/organization/Donation.tsx @@ -378,7 +378,7 @@ function Keyboard({ amount, setAmount} : any) { const [error, setError] = useState(false); function pressNumber(amount: string, number: number) { if ( - parseFloat(amount.replace("$", "0") + number) > 9999 || + parseFloat(amount.replace("$", "0") + number) > 9999.99 || (amount == "$" && number == 0) || amount[amount.length - 3] == "." ) {