From 660938c5e30447130ad4f6803612e9403fabee0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valent=C3=ADn=20Valverde?= Date: Mon, 14 Nov 2022 16:12:39 +0100 Subject: [PATCH] fix: fixed balance to 2 decimals --- src/modules/binnacle/components/WorkingTime/WorkingTime.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/binnacle/components/WorkingTime/WorkingTime.tsx b/src/modules/binnacle/components/WorkingTime/WorkingTime.tsx index 51450315c..cdf69acbf 100644 --- a/src/modules/binnacle/components/WorkingTime/WorkingTime.tsx +++ b/src/modules/binnacle/components/WorkingTime/WorkingTime.tsx @@ -31,7 +31,7 @@ export const WorkingTime = observer(() => { useEffect(() => { const hourBalance = (worked ?? 0) - (target ?? 0) - setHourBalance(hourBalance) + setHourBalance(Number(hourBalance.toFixed(2) ?? 0)) setIsNegativeBalance(hourBalance < 0) }, [worked, target])