Skip to content

Commit

Permalink
added loader in download button
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsingal committed Dec 21, 2023
1 parent eb2dadc commit 469357a
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down Expand Up @@ -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={<DownloadIcon />}
onClick={handleDownloadData}
loading={
downloadImpactData.isLoading ||
downloadActualVsScenarioData.isLoading ||
downloadScenarioVsScenarioData.isLoading
}
>
Download Data
</Button>
Expand Down

1 comment on commit 469357a

@vercel
Copy link

@vercel vercel bot commented on 469357a Dec 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

landgriffon-client – ./client

landgriffon-client-git-dev-vizzuality1.vercel.app
landgriffon-client-vizzuality1.vercel.app
landgriffon-client.vercel.app

Please sign in to comment.