mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-18 18:49: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
|
@ -6,7 +6,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 { t } = useTranslation();
|
||||
const { setEvents } = useContext(EventContext);
|
||||
const { data: radarrData, error: radarrError } = useWidgetAPI(config, "calendar", {
|
||||
|
@ -52,5 +52,5 @@ export default function Integration({ config, params }) {
|
|||
}, [radarrData, radarrError, config, setEvents, t]);
|
||||
|
||||
const error = radarrError ?? radarrData?.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