From dbcd6f5df781b9ee80efabbe66d0214ae009e44a Mon Sep 17 00:00:00 2001 From: Zlendy Date: Sat, 28 Jan 2023 14:27:50 +0100 Subject: [PATCH] Fix: Immich API no longer has an "error" property --- src/widgets/immich/component.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/widgets/immich/component.jsx b/src/widgets/immich/component.jsx index 212bac56..1c5aa902 100644 --- a/src/widgets/immich/component.jsx +++ b/src/widgets/immich/component.jsx @@ -5,10 +5,10 @@ import useWidgetAPI from "utils/proxy/use-widget-api"; export default function Component({ service }) { const { widget } = service; - const { data: immichData, error: immichError } = useWidgetAPI(widget); + const { data: immichData } = useWidgetAPI(widget); - if (immichError) { - return ; + if (immichData?.statusCode) { // Unauthorized + return ; } return (