From 469357a508be1651206a6a892980540d5b770350 Mon Sep 17 00:00:00 2001 From: David Inga Date: Thu, 21 Dec 2023 16:07:09 +0100 Subject: [PATCH] added loader in download button --- .../analysis-table/component.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/client/src/containers/analysis-visualization/analysis-table/component.tsx b/client/src/containers/analysis-visualization/analysis-table/component.tsx index 42b9cf6d7..08679003b 100644 --- a/client/src/containers/analysis-visualization/analysis-table/component.tsx +++ b/client/src/containers/analysis-visualization/analysis-table/component.tsx @@ -207,7 +207,6 @@ const AnalysisTable = () => { const handleDownloadData = useCallback(async () => { let csv = null; - console.log(currentScenario, scenarioToCompare); // actual vs scenario if (!currentScenario && scenarioToCompare) { csv = await downloadActualVsScenarioData.mutateAsync({ @@ -534,9 +533,19 @@ const AnalysisTable = () => { variant="secondary" size="base" className="flex-shrink-0" - disabled={isLoading} + disabled={ + isLoading || + downloadImpactData.isLoading || + downloadActualVsScenarioData.isLoading || + downloadScenarioVsScenarioData.isLoading + } icon={} onClick={handleDownloadData} + loading={ + downloadImpactData.isLoading || + downloadActualVsScenarioData.isLoading || + downloadScenarioVsScenarioData.isLoading + } > Download Data