From d13764652bb237c1d59f8490a4e913c30b6bf691 Mon Sep 17 00:00:00 2001 From: tomato6966 Date: Sat, 8 Mar 2025 16:47:03 +0100 Subject: [PATCH] add money equalization for simplesavingsplan simulator --- src/components/SavingsPlanSimulator.tsx | 29 ++++++++++++++----------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/SavingsPlanSimulator.tsx b/src/components/SavingsPlanSimulator.tsx index 7c8681e..40cba52 100644 --- a/src/components/SavingsPlanSimulator.tsx +++ b/src/components/SavingsPlanSimulator.tsx @@ -352,19 +352,22 @@ export const SavingsPlanSimulator = ({
{stocks.map(stock => ( -
-
- {stock.name} - handleAllocationChange(stock.id, Number(e.target.value))} - className="border p-1 rounded dark:bg-slate-700 dark:text-white dark:border-slate-600 w-16 text-right" - /> - % +
+
+
+ {stock.name} + handleAllocationChange(stock.id, Number(e.target.value))} + className="border p-1 rounded dark:bg-slate-700 dark:text-white dark:border-slate-600 w-16 text-right" + /> + % +
+
Equals: {totalAmount * (allocations[stock.id] || 0) / 100}€
))}