VSN-2100/ feat(trip tracking) : add real-time passenger trip tracking with HTTP polling
The changes included in this MR are as follows :
- Implement real-time driver position tracking using HTTP polling (every 3s)
- Fix multiple navigation and state management bugs in the tracking screen
Updated: Tracking store (trackingStore.ts)
- Connect/disconnect polling actions integrated into Zustand store
- Dedicated
validatePassengerTrip()function for API data validation (id, date format, status) - 5-minute cache on
fetchTripsto avoid redundant API calls on tab switches
Fixed: Tracking screen
- Stale
tripIdfrom Expo Router: only usetripIdparam whenfromPlanning === "true" - Trip selection: sort by closest to current time instead of returning first match
- Back button:
useEffectdeps changed from[]to[fromPlanning]so it reacts to navigation changes - Always disconnect polling in cleanup, removed
!isTrackingActiveguard