aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modern/src/other/ReplayPage.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/modern/src/other/ReplayPage.js b/modern/src/other/ReplayPage.js
index a7d5ad49..7db751b2 100644
--- a/modern/src/other/ReplayPage.js
+++ b/modern/src/other/ReplayPage.js
@@ -140,15 +140,10 @@ const ReplayPage = () => {
}
});
- const handleDownload = useCatch(async () => {
+ const handleDownload = () => {
const query = new URLSearchParams({ deviceId: selectedDeviceId, from, to });
- const response = await fetch(`/api/positions/kml?${query.toString()}`);
- if (response.ok) {
- window.location.assign(window.URL.createObjectURL(await response.blob()));
- } else {
- throw Error(await response.text());
- }
- });
+ window.location.assign(`/api/positions/kml?${query.toString()}`);
+ };
return (
<div className={classes.root}>