From 2a849cea579fe089185570c2cb059dae93d8874e Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sun, 26 Jul 2026 18:37:24 +0100 Subject: [PATCH] Enhance StateDisplay component to improve progress calculation - Introduced a new progressValue calculation to round the currentState.progress for better precision in the displayed progress percentage. - Updated the Progress component to utilize the new progressValue, ensuring accurate representation of loading progress. --- src/components/Dashboard/common/StateDisplay.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Dashboard/common/StateDisplay.jsx b/src/components/Dashboard/common/StateDisplay.jsx index 02cbe95..8aaa091 100644 --- a/src/components/Dashboard/common/StateDisplay.jsx +++ b/src/components/Dashboard/common/StateDisplay.jsx @@ -29,6 +29,7 @@ const StateDisplay = ({ progress: 0 } const [showMessageModal, setShowMessageModal] = useState(false) + const progressValue = Math.round(currentState.progress * 1000) / 10 return ( <> @@ -40,9 +41,10 @@ const StateDisplay = ({ {showProgress && loadingProgressTypes.includes(currentState.type) && currentState?.progress && + progressValue !== 100 && currentState?.progress > 0 ? (