mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Simplify error catching
This commit is contained in:
@@ -9,8 +9,8 @@ export default function Component({ service }) {
|
||||
const { widget } = service;
|
||||
const { data: pyloadData, error: pyloadError } = useWidgetAPI(widget, "status");
|
||||
|
||||
if (pyloadError || pyloadData?.error) {
|
||||
return <Container error={t("widget.api_error")} />;
|
||||
if (pyloadError) {
|
||||
return <Container error={pyloadError} />;
|
||||
}
|
||||
|
||||
if (!pyloadData) {
|
||||
|
||||
Reference in New Issue
Block a user