From 1c25d2550b6f068f6eff9c119f20750abc5aacce Mon Sep 17 00:00:00 2001 From: shamoon <4887959+shamoon@users.noreply.github.com> Date: Wed, 11 Sep 2024 18:12:12 -0700 Subject: [PATCH] Keep it tight --- src/widgets/technitium/component.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/widgets/technitium/component.jsx b/src/widgets/technitium/component.jsx index 1d1909c8..d510a59d 100644 --- a/src/widgets/technitium/component.jsx +++ b/src/widgets/technitium/component.jsx @@ -52,9 +52,8 @@ export default function Component({ service }) { } function toPercent(value, total) { - const percentage = (value / total) * 100; return t("common.percent", { - value: !Number.isNaN(percentage) ? percentage : 0, + value: !Number.isNaN(value / total) ? 100 * (value / total) : 0, maximumFractionDigits: 2, }); }