mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-07 14:18:47 +00:00
Fix: pihole ads_percentage_today
sometimes returned as string (#3313)
This commit is contained in:
parent
034f6d29d6
commit
303a62369f
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue