From 295a3abd59c78fe0486957f907bf24c2c5992bcf Mon Sep 17 00:00:00 2001 From: Thomas Heartman Date: Wed, 3 Sep 2025 12:23:36 +0200 Subject: [PATCH] fix: Only show "not enough data" text when there isn't enough data. (#10604) The previous implementation had a small bug where it would show "not enough data" even if the graph was loading. This commit fixes that. While working, I thought that maybe we should keep the current data while we're fetching new data instead of adding a cover, but all the other graphs use a cover when loading, so I've not made any changes to that effect. --- .../CreationArchiveChart/CreationArchiveChart.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx index 413e6738b8..c3332cdb80 100644 --- a/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx +++ b/frontend/src/component/insights/componentsChart/CreationArchiveChart/CreationArchiveChart.tsx @@ -139,6 +139,7 @@ export const CreationArchiveChart: FC = ({ }, [creationVsArchivedChart, theme]); const useGraphCover = notEnoughData || isLoading; + const showNotEnoughDataText = notEnoughData && !isLoading; const data = useGraphCover ? placeholderData : aggregateOrProjectData; const options = useMemo( @@ -229,7 +230,7 @@ export const CreationArchiveChart: FC = ({ {useGraphCover ? ( - {notEnoughData ? : isLoading} + {showNotEnoughDataText ? : isLoading} ) : null}