Unifi widgets support sites other than default
This commit is contained in:
1 parent
c2983197a0
commit
17ebdd8226
3 files changed
+6
-3
No files matched your search
@@ -15,7 +15,7 @@ export default function Component({ service }) {
|
||||
return <Container error={statsError} />;
|
||||
}
|
||||
|
||||
const defaultSite = statsData?.data?.find(s => s.name === "default");
|
||||
const defaultSite = widget.site ? statsData?.data.find(s => s.desc === widget.site) : statsData?.data?.find(s => s.name === "default");
|
||||
|
||||
if (!defaultSite) {
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user