Fix GPX export: use API route with direct download link

React Router page actions wrap responses, preventing raw file
downloads. Moved GPX export to GET /api/routes/:id/gpx and
changed the button to a plain <a download> link.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-24 20:57:59 +01:00 committed by GitHub
parent 155d36e94c
commit 2e2dbe05c1
3 changed files with 24 additions and 20 deletions

View file

@ -14,5 +14,6 @@ export default [
route("routes/:id/edit", "routes/routes.$id.edit.tsx"),
route("api/routes/:id/callback", "routes/api.routes.$id.callback.ts"),
route("api/routes/:id/edit-in-planner", "routes/api.routes.$id.edit-in-planner.ts"),
route("api/routes/:id/gpx", "routes/api.routes.$id.gpx.ts"),
route("users/:username", "routes/users.$username.tsx"),
] satisfies RouteConfig;