This PR uses the Download component that was added previously to allow the user to download all of the data as CSV or GeoJSON in the AlertsIntroPanel view.
Download now has separate downloadAlertCSV / downloadAlertGeoJSON and downloadAllCSV / downloadAllGeoJSON functions, and a typeOfData prop passed by an upstream component determines which one is run. (In order to parse the data differently depending on which kind of dataset is passed to it, a singular alert or the entire alert dataset.)
Closes https://github.com/ConservationMetrics/guardianconnector-views/issues/16 (insofar as it ticks the last item off the list!)
This PR uses the
Download
component that was added previously to allow the user to download all of the data as CSV or GeoJSON in theAlertsIntroPanel
view.Download
now has separatedownloadAlertCSV
/downloadAlertGeoJSON
anddownloadAllCSV
/downloadAllGeoJSON
functions, and atypeOfData
prop passed by an upstream component determines which one is run. (In order to parse the data differently depending on which kind of dataset is passed to it, a singular alert or the entire alert dataset.)