Fix useMapData debounce loading state

This commit is contained in:
2026-04-20 20:10:48 +02:00
parent 1694ac17f8
commit 8b4a2f0b71
3 changed files with 84 additions and 4 deletions

View File

@@ -205,7 +205,7 @@ Issues are grouped by category and ordered roughly by severity. Each entry descr
---
### TASK-011 — No `React.memo` on any heavy component
### TASK-011 — No `React.memo` on any heavy component (done)
**Where found:** Every component in `frontend/src/components/` — zero uses of `React.memo` exist in the codebase.
@@ -222,7 +222,9 @@ Issues are grouped by category and ordered roughly by severity. Each entry descr
---
### TASK-012 — `useMapData` sets `loading=true` before the debounce fires
### TASK-012 — `useMapData` sets `loading=true` before the debounce fires (done)
**Where fixed:** `frontend/src/hooks/useMapData.ts`, `frontend/src/hooks/__tests__/useMapData.test.ts`
**Where found:** `frontend/src/hooks/useMapData.ts`, `load` callback — `setLoading(true)` is called at the top of `load`, but the actual fetch is deferred inside a `setTimeout` of 300 ms.