Fix useMapData debounce loading state
This commit is contained in:
@@ -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.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user