From 7865f48de5c3c63fae524113e1169cc80677bebb Mon Sep 17 00:00:00 2001 From: "m.kindritskiy" Date: Tue, 17 Dec 2024 14:44:12 +0200 Subject: [PATCH] fix stuck loading text on ui --- ui/src/Dashboard/Flag.jsx | 6 +++--- ui/src/Dashboard/Value.jsx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/src/Dashboard/Flag.jsx b/ui/src/Dashboard/Flag.jsx index b4e8702..077c9af 100644 --- a/ui/src/Dashboard/Flag.jsx +++ b/ui/src/Dashboard/Flag.jsx @@ -148,9 +148,9 @@ const HistoryModal = ({ flagId, open, onClose, createdTimestamp, reportedTimesta } }, [open]); - if (loading || !data) { - return

Loading...

; - }; + if (!open || loading || !data) { + return null; + } const { flag: { changes } } = data; diff --git a/ui/src/Dashboard/Value.jsx b/ui/src/Dashboard/Value.jsx index 1212eeb..9414b25 100644 --- a/ui/src/Dashboard/Value.jsx +++ b/ui/src/Dashboard/Value.jsx @@ -163,9 +163,9 @@ const HistoryModal = ({ valueId, open, onClose, createdTimestamp, reportedTimest } }, [open]); - if (loading || !data) { - return

Loading...

; - }; + if (!open || loading || !data) { + return null; + } const { value: { changes } } = data;