Add setting to hide widgets on failure

This commit is contained in:
Georges-Antoine Assi 2023-04-30 19:09:37 -04:00
parent 3d654e03c6
commit bd1c2b1881
No known key found for this signature in database
GPG key ID: E01F01B06E816D51
84 changed files with 103 additions and 93 deletions

View file

@ -12,7 +12,7 @@ export default function Component({ service }) {
const { data: statsData, error: statsError } = useWidgetAPI(widget, "stat/sites");
if (statsError) {
return <Container error={statsError} />;
return <Container service={service} error={statsError} />;
}
const defaultSite = widget.site ? statsData?.data.find(s => s.desc === widget.site) : statsData?.data?.find(s => s.name === "default");