From 377ac40bd62eeca0089fd6d69dc8d6afed9ba74f Mon Sep 17 00:00:00 2001 From: danielq65 Date: Sun, 23 Apr 2023 18:04:01 -0400 Subject: [PATCH] updated loan calculator Fixed display bug with the decimal places --- src/components/LoanCalculator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/LoanCalculator.js b/src/components/LoanCalculator.js index 8d08aa2..9a9b93c 100644 --- a/src/components/LoanCalculator.js +++ b/src/components/LoanCalculator.js @@ -34,9 +34,9 @@ const LoanCalculator = () => { setLoanDuration(event.target.value)}/>

- Monthly Payment: ${parseFloat(monthlyPayment.toFixed(2))} + Monthly Payment: ${monthlyPayment.toFixed(2)}

Principal Paid: ${loanAmount}
-
Interest Paid: ${parseFloat(interestPaid.toFixed(2))}
+
Interest Paid: ${interestPaid.toFixed(2)}