Skip to content

Commit

Permalink
fix: fixed balance to 2 decimals
Browse files Browse the repository at this point in the history
  • Loading branch information
valen-developer committed Nov 14, 2022
1 parent c31e096 commit 660938c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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])

Expand Down

0 comments on commit 660938c

Please sign in to comment.