From 6d55e1c5a9d4793b577a8d80d9f6458d9da0c41e Mon Sep 17 00:00:00 2001 From: Jeff Emmett Date: Mon, 15 Dec 2025 15:45:09 -0500 Subject: [PATCH] Reduce maxAge to 5 seconds for fresher location updates --- src/hooks/useLocationSharing.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useLocationSharing.ts b/src/hooks/useLocationSharing.ts index 193a3d7..1202927 100644 --- a/src/hooks/useLocationSharing.ts +++ b/src/hooks/useLocationSharing.ts @@ -8,7 +8,7 @@ interface UseLocationSharingOptions { updateInterval?: number; /** Enable high accuracy mode (uses more battery) */ highAccuracy?: boolean; - /** Maximum age of cached position in ms (default: 30000) */ + /** Maximum age of cached position in ms (default: 5000) - lower = fresher positions */ maxAge?: number; /** Timeout for position request in ms (default: 30000) */ timeout?: number; @@ -38,7 +38,7 @@ export function useLocationSharing( onLocationUpdate, updateInterval = 5000, highAccuracy = true, - maxAge = 30000, + maxAge = 5000, // Allow cached position up to 5 seconds old timeout = 30000, } = options;