Skip to content

Commit

Permalink
fix: fix download url
Browse files Browse the repository at this point in the history
  • Loading branch information
AldemirLucas committed Aug 13, 2024
1 parent 9043356 commit 565d389
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions next/components/molecules/DataInformationQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,7 @@ export default function DataInformationQuery({ resource }) {
setGcpTableId(resource.cloudTables[0]?.gcpTableId || "")
}

if (gcpDatasetID) {
if (gcpTableId) {
setDownloadUrl(`https://storage.googleapis.com/basedosdados-public/one-click-download/${gcpDatasetID}/${gcpTableId}/${gcpTableId}.csv.gz`)
}
}
setDownloadUrl(`https://storage.googleapis.com/basedosdados-public/one-click-download/${resource.cloudTables[0]?.gcpDatasetId || ""}/${resource.cloudTables[0]?.gcpTableId || ""}/${resource.cloudTables[0]?.gcpTableId || ""}.csv.gz`)
}, [resource.numberRows, resource.cloudTables])

useEffect(() => {
Expand Down

0 comments on commit 565d389

Please sign in to comment.