mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-08-26 17:31:37 +00:00
The useEffect-based boundary rendering was unreliable due to React's state lifecycle - the effect would fire before boundary data arrived from the API, then not re-trigger properly when data was populated. New approach: - Remove the boundary useEffect entirely - Define updateBoundary function in map load handler - Store function reference in Zustand store and local ref - PlaceCard calls updateBoundary(geometry) directly when API returns - Click handlers call updateBoundary(null) to clear This bypasses React's render cycle - the map library handles its own state and we tell it what to draw when we have the data. Test sequence: - Click Twin Falls → boundary shows on first click - Click Kimberly → boundary shows on first click - Switch between them → old clears, new shows - Click empty map → boundary clears Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| public | ||
| src | ||
| .gitignore | ||
| deploy.sh | ||
| eslint.config.js | ||
| index.html | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| postcss.config.js | ||
| README.md | ||
| vite.config.js | ||
navi
Navi — self-hosted navigation web frontend for Echo6