mirror of
https://github.com/karl0ss/homepage.git
synced 2025-05-01 21:13:39 +01:00
Handle nextdns no devices setup, data pending
This commit is contained in:
parent
fb2492e577
commit
f7d5582f57
@ -372,5 +372,9 @@
|
|||||||
"paperlessngx": {
|
"paperlessngx": {
|
||||||
"inbox": "Inbox",
|
"inbox": "Inbox",
|
||||||
"total": "Total"
|
"total": "Total"
|
||||||
|
},
|
||||||
|
"nextdns": {
|
||||||
|
"wait": "Please Wait",
|
||||||
|
"no_devices": "No Device Data Received"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -18,14 +18,22 @@ export default function Component({ service }) {
|
|||||||
if (!nextdnsData) {
|
if (!nextdnsData) {
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
No data
|
<Block key="status" label="widget.status" value={t("nextdns.wait")} />
|
||||||
|
</Container>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!nextdnsData?.data?.length) {
|
||||||
|
return (
|
||||||
|
<Container service={service}>
|
||||||
|
<Block key="status" label="widget.status" value={t("nextdns.no_devices")} />
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container service={service}>
|
<Container service={service}>
|
||||||
{nextdnsData?.data?.map(d => <Block key={d.status} label={d.status} value={t("common.number", { value: d.queries })} />)}
|
{nextdnsData.data.map(d => <Block key={d.status} label={d.status} value={t("common.number", { value: d.queries })} />)}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user