Fix BanUnbanForm floating promises and add submit guards
This commit is contained in:
@@ -53,7 +53,11 @@ Issues are grouped by category and ordered roughly by severity. Each entry descr
|
||||
|
||||
---
|
||||
|
||||
### TASK-003 — `BanUnbanForm` floating promises and no double-submit guard
|
||||
### TASK-003 — `BanUnbanForm` floating promises and no double-submit guard (done)
|
||||
|
||||
**Where fixed:** `frontend/src/pages/jails/BanUnbanForm.tsx`, `frontend/src/pages/jails/__tests__/BanUnbanForm.test.tsx`
|
||||
|
||||
**Summary:** Converted ban and unban handlers to async functions with separate submit states and disabled submit buttons while requests are in flight.
|
||||
|
||||
**Where found:** `frontend/src/pages/jails/BanUnbanForm.tsx` — `handleBan` and `handleUnban` are synchronous functions that call `onBan(…).then(…).catch(…)`. The returned promise is not awaited and is not assigned to anything.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user