Problem
Detail pages read different undocumented globals: activity/[id].stx uses window.__routeParams?.id ?? 1, trail/[id].stx uses window.stx?._rp?.id ?? window.__stx_rp?.id ?? 0, territory/[id].stx uses window.__routeParams?.id ?? 1. If the router changes they silently load id 1/0.
Acceptance
- One
useRouteParam(name)helper used by all detail pages. - No silent fallback to a wrong id.