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

This commit is contained in:
shamoon
2024-02-05 14:46:17 -08:00
committed by GitHub
parent 259d0f1bb9
commit 8eb61ef9ff

View File

@@ -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" />