From 588429c868f1e4584e37a06c3365dbb60681055f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Batuhan=20=C5=9Eanl=C4=B1?= <32306925+batuhan0sanli@users.noreply.github.com> Date: Tue, 26 Sep 2023 13:25:11 +0300 Subject: [PATCH] Feature: Added detect octoprint offline printer (#2068) --- src/widgets/octoprint/component.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/widgets/octoprint/component.jsx b/src/widgets/octoprint/component.jsx index ce87548e1..ca006d72c 100644 --- a/src/widgets/octoprint/component.jsx +++ b/src/widgets/octoprint/component.jsx @@ -8,6 +8,12 @@ export default function Component({ service }) { const { data: printerStats, error: printerStatsError } = useWidgetAPI(widget, "printer_stats"); const { data: jobStats, error: jobStatsError } = useWidgetAPI(widget, "job_stats"); + if (printerStatsError && jobStats) { + return + + + } + if (printerStatsError) { return ; }