mirror of
https://github.com/karl0ss/homepage.git
synced 2025-04-29 12:03:41 +01:00
Fix: pihole ads_percentage_today
sometimes returned as string (#3313)
This commit is contained in:
parent
034f6d29d6
commit
303a62369f
@ -32,7 +32,7 @@ export default function Component({ service }) {
|
||||
|
||||
let blockedValue = `${t("common.number", { value: parseInt(piholeData.ads_blocked_today, 10) })}`;
|
||||
if (!widget.fields.includes("blocked_percent")) {
|
||||
blockedValue += ` (${t("common.percent", { value: parseFloat(piholeData.ads_percentage_today.toPrecision(3)) })})`;
|
||||
blockedValue += ` (${t("common.percent", { value: parseFloat(piholeData.ads_percentage_today).toPrecision(3) })})`;
|
||||
}
|
||||
|
||||
return (
|
||||
@ -41,7 +41,7 @@ export default function Component({ service }) {
|
||||
<Block label="pihole.blocked" value={blockedValue} />
|
||||
<Block
|
||||
label="pihole.blocked_percent"
|
||||
value={t("common.percent", { value: parseFloat(piholeData.ads_percentage_today.toPrecision(3)) })}
|
||||
value={t("common.percent", { value: parseFloat(piholeData.ads_percentage_today).toPrecision(3) })}
|
||||
/>
|
||||
<Block
|
||||
label="pihole.gravity"
|
||||
|
Loading…
x
Reference in New Issue
Block a user