mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-21 03:59:50 +00:00
Fix: Respect hideErrors for Calendar widget (#2259)
This commit is contained in:
parent
654f16dbb5
commit
5512d05f00
5 changed files with 12 additions and 9 deletions
|
@ -5,7 +5,7 @@ import useWidgetAPI from "../../../utils/proxy/use-widget-api";
|
|||
import { EventContext } from "../../../utils/contexts/calendar";
|
||||
import Error from "../../../components/services/widget/error";
|
||||
|
||||
export default function Integration({ config, params }) {
|
||||
export default function Integration({ config, params, hideErrors = false }) {
|
||||
const { setEvents } = useContext(EventContext);
|
||||
const { data: readarrData, error: readarrError } = useWidgetAPI(config, "calendar", {
|
||||
...params,
|
||||
|
@ -37,5 +37,5 @@ export default function Integration({ config, params }) {
|
|||
}, [readarrData, readarrError, config, setEvents]);
|
||||
|
||||
const error = readarrError ?? readarrData?.error;
|
||||
return error && <Error error={{ message: `${config.type}: ${error.message ?? error}` }} />;
|
||||
return error && !hideErrors && <Error error={{ message: `${config.type}: ${error.message ?? error}` }} />;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue