mirror of
https://github.com/gabehf/BudgetBuddy.git
synced 2026-03-15 10:16:00 -07:00
updated loan calculator
Fixed display bug with the decimal places
This commit is contained in:
parent
ee114ea3aa
commit
377ac40bd6
1 changed files with 2 additions and 2 deletions
|
|
@ -34,9 +34,9 @@ const LoanCalculator = () => {
|
||||||
<FormInputGroup text="Loan Duration in Years" placeholder="Enter the duration of the loan in years" value={loanDuration} onInput={(event) => setLoanDuration(event.target.value)}/>
|
<FormInputGroup text="Loan Duration in Years" placeholder="Enter the duration of the loan in years" value={loanDuration} onInput={(event) => setLoanDuration(event.target.value)}/>
|
||||||
|
|
||||||
<h4 className="alert alert-info fw-bold">
|
<h4 className="alert alert-info fw-bold">
|
||||||
Monthly Payment: ${parseFloat(monthlyPayment.toFixed(2))}
|
Monthly Payment: ${monthlyPayment.toFixed(2)}
|
||||||
<h5 className="mt-4">Principal Paid: ${loanAmount}</h5>
|
<h5 className="mt-4">Principal Paid: ${loanAmount}</h5>
|
||||||
<h5>Interest Paid: ${parseFloat(interestPaid.toFixed(2))}</h5>
|
<h5>Interest Paid: ${interestPaid.toFixed(2)}</h5>
|
||||||
</h4>
|
</h4>
|
||||||
<button type="submit" className="btn btn-primary btn-lg w-100 mt-3 center" onClick={calculateMonthlyPayment}>Calculate</button>
|
<button type="submit" className="btn btn-primary btn-lg w-100 mt-3 center" onClick={calculateMonthlyPayment}>Calculate</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue