From d0382b654326b6a8951cfda540f0943a722a133a Mon Sep 17 00:00:00 2001 From: Kalina Zhecheva <60223025+kzhecheva@users.noreply.github.com> Date: Wed, 18 Oct 2023 15:13:40 +0300 Subject: [PATCH] fix: rounds correctly Donated money value in Statistics section (#1623) --- .../PlatformStatisticsSection/Statistics/Statistics.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/client/index/sections/PlatformStatisticsSection/Statistics/Statistics.tsx b/src/components/client/index/sections/PlatformStatisticsSection/Statistics/Statistics.tsx index a8bf42c6b..cc473901e 100644 --- a/src/components/client/index/sections/PlatformStatisticsSection/Statistics/Statistics.tsx +++ b/src/components/client/index/sections/PlatformStatisticsSection/Statistics/Statistics.tsx @@ -25,7 +25,7 @@ export default function Statistics() { const donatedMoney = fromMoney(totalDonatedMoney?.total || 0) const unit = donatedMoney.toString().split('.')[0] - const fraction = donatedMoney.toString().split('.')[1] + const fraction = donatedMoney?.toFixed(2).toString().split('.')[1] const sections: { value?: number; message: string }[] = [ {