Update container.jsx

This commit is contained in:
shamoon
2024-06-22 13:06:11 -07:00
parent 6db097ed85
commit b4a90fbf24

View File

@@ -8,13 +8,20 @@ export default function Container({ children, widget, error = null, chart = true
const { settings } = useContext(SettingsContext);
const hideErrors = settings.hideErrors || widget?.hideErrors;
if (error) {
if (hideErrors) {
return null;
}
return <Error />;
}
return (
<div>
{children}
<div className={`absolute top-0 right-0 bottom-0 left-0 overflow-clip pointer-events-none ${className}`} />
{chart && <div className="h-[68px] overflow-clip" />}
{!chart && <div className="h-[16px] overflow-clip" />}
{error && !hideErrors && <Error />}
</div>
);
}