mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-13 08:20:34 +00:00
Unifi widgets support sites other than default
This commit is contained in:
parent
c2983197a0
commit
17ebdd8226
3 changed files with 6 additions and 3 deletions
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue