From 56c2e739d95dd7b64a7332e2320579925c1751a9 Mon Sep 17 00:00:00 2001 From: Ariel Costas Guerrero Date: Fri, 13 Mar 2026 10:09:30 +0100 Subject: Refactor geolocation settings across components; improve accuracy and timeout configurations --- src/frontend/app/routes/home.tsx | 5 +++-- src/frontend/app/routes/planner.tsx | 6 +++++- 2 files changed, 8 insertions(+), 3 deletions(-) (limited to 'src/frontend/app/routes') diff --git a/src/frontend/app/routes/home.tsx b/src/frontend/app/routes/home.tsx index 0229ad5..45d7ddf 100644 --- a/src/frontend/app/routes/home.tsx +++ b/src/frontend/app/routes/home.tsx @@ -47,7 +47,8 @@ export default function StopList() { }, { enableHighAccuracy: false, - maximumAge: 5 * 60 * 1000, + maximumAge: Infinity, + timeout: 10000, } ); }, []); @@ -317,7 +318,7 @@ export default function StopList() { ))} diff --git a/src/frontend/app/routes/planner.tsx b/src/frontend/app/routes/planner.tsx index 7bfc5a3..b7ecaf9 100644 --- a/src/frontend/app/routes/planner.tsx +++ b/src/frontend/app/routes/planner.tsx @@ -831,7 +831,11 @@ export default function PlannerPage() { () => { // If geolocation fails, just keep origin empty }, - { enableHighAccuracy: true, timeout: 10000 } + { + enableHighAccuracy: true, + timeout: 10000, + maximumAge: 60 * 60 * 1000, // 1 hour in milliseconds + } ); } }} -- cgit v1.3