From f7d5582f5789e7e6e50d0a4ca52927cbca339f94 Mon Sep 17 00:00:00 2001
From: Michael Shamoon <4887959+shamoon@users.noreply.github.com>
Date: Fri, 16 Dec 2022 14:24:32 -0800
Subject: [PATCH] Handle nextdns no devices setup, data pending
---
public/locales/en/common.json | 4 ++++
src/widgets/nextdns/component.jsx | 12 ++++++++++--
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/public/locales/en/common.json b/public/locales/en/common.json
index 80ba5357e..6081a71e6 100644
--- a/public/locales/en/common.json
+++ b/public/locales/en/common.json
@@ -372,5 +372,9 @@
"paperlessngx": {
"inbox": "Inbox",
"total": "Total"
+ },
+ "nextdns": {
+ "wait": "Please Wait",
+ "no_devices": "No Device Data Received"
}
}
\ No newline at end of file
diff --git a/src/widgets/nextdns/component.jsx b/src/widgets/nextdns/component.jsx
index 75ef04f01..ae2397701 100644
--- a/src/widgets/nextdns/component.jsx
+++ b/src/widgets/nextdns/component.jsx
@@ -18,14 +18,22 @@ export default function Component({ service }) {
if (!nextdnsData) {
return (
- No data
+
+
+ );
+ }
+
+ if (!nextdnsData?.data?.length) {
+ return (
+
+
);
}
return (
- {nextdnsData?.data?.map(d => )}
+ {nextdnsData.data.map(d => )}
);
}