diff --git a/README.md b/README.md index d3cb080..49854ce 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Read Bellingcat's article about this project in ## Deployment This project is now living in github pages and the API has switched to auto-updated S3 files. +Access it at https://bellingcat-embeds.ams3.cdn.digitaloceanspaces.com/production/ukr/timemap/api.json Release with `npm run deploy`. diff --git a/src/components/controls/DownloadButton.jsx b/src/components/controls/DownloadButton.jsx index c02929f..17c20c0 100644 --- a/src/components/controls/DownloadButton.jsx +++ b/src/components/controls/DownloadButton.jsx @@ -9,6 +9,7 @@ export class DownloadButton extends Component { onDownload(format, domain) { let filename = `ukr-civharm-${dayjs().format("YYYY-MM-DD")}`; if (format === "api") { + console.log(config["API_DATA"]) window.open(config["API_DATA"], '_blank'); }else if (format === "csv") { let outputData = this.getCsvData(domain); @@ -68,6 +69,14 @@ export class DownloadButton extends Component { render() { const { language, domain, format } = this.props; const textByFormat = copy[language].toolbar.download.panel.formats[format]; + + let description = {textByFormat.description}; + + if(format=='api'){ + const endpoint = config["API_DATA"]; + description = {textByFormat.description} Copy API endpoint link from here. + } + return (
{"download"} {textByFormat.label} - {textByFormat.description} + {description}
); }