Unifi widget: Show a more helpful error if specified site not found (#2839)

pull/2845/head
shamoon 3 months ago committed by GitHub
parent 259d0f1bb9
commit 8eb61ef9ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,6 +20,10 @@ export default function Component({ service }) {
: statsData?.data?.find((s) => s.name === "default");
if (!defaultSite) {
if (widget.site) {
return <Container service={service} error={{ message: `Site '${widget.site}' not found` }} />;
}
return (
<Container service={service}>
<Block label="unifi.uptime" />

Loading…
Cancel
Save