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;