mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-10 07:18:47 +00:00
Add setting to hide widgets on failure
This commit is contained in:
parent
3d654e03c6
commit
bd1c2b1881
84 changed files with 103 additions and 93 deletions
|
@ -1,8 +1,18 @@
|
|||
import { useContext } from "react";
|
||||
|
||||
import Error from "./error";
|
||||
|
||||
import { SettingsContext } from "utils/contexts/settings";
|
||||
|
||||
export default function Container({ error = false, children, service }) {
|
||||
const { settings } = useContext(SettingsContext);
|
||||
|
||||
if (error) {
|
||||
return <Error error={error} />
|
||||
if (settings.hideErrors || service.widget.hide_errors) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return <Error service={service} error={error} />
|
||||
}
|
||||
|
||||
let visibleChildren = children;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue