import { useContext } from "react"; import Error from "./error"; import { SettingsContext } from "utils/contexts/settings"; export default function Container({ children, widget, error = null, chart = true, className = "" }) { const { settings } = useContext(SettingsContext); const hideErrors = settings.hideErrors || widget?.hideErrors; if (error) { if (hideErrors) { return null; } return ; } return (
{children}
{chart &&
} {!chart &&
}
); }