Refactor frontend API calls into hooks and complete task states
This commit is contained in:
@@ -249,6 +249,8 @@ Remove or rewrite the docstring snippet so it does not contain a bare `print()`
|
||||
|
||||
#### TASK F-2 — Wrap `JailDetailPage` jail-control API calls in a hook
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.1 — Pages must not call API functions directly.
|
||||
|
||||
**Files affected:**
|
||||
@@ -265,6 +267,8 @@ Remove or rewrite the docstring snippet so it does not contain a bare `print()`
|
||||
|
||||
#### TASK F-3 — Wrap `MapPage` config API call in a hook
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.1 — Pages must not call API functions directly.
|
||||
|
||||
**Files affected:**
|
||||
@@ -280,6 +284,8 @@ Remove or rewrite the docstring snippet so it does not contain a bare `print()`
|
||||
|
||||
#### TASK F-4 — Wrap `BlocklistsPage` preview API call in a hook
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.1 — Pages must not call API functions directly.
|
||||
|
||||
**Files affected:**
|
||||
@@ -295,6 +301,8 @@ Remove or rewrite the docstring snippet so it does not contain a bare `print()`
|
||||
|
||||
#### TASK F-5 — Move all API calls out of `BannedIpsSection` into a hook
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.2 — Components must not call API functions; all data must come via props or hooks invoked in the parent.
|
||||
|
||||
**Files affected:**
|
||||
@@ -311,6 +319,8 @@ Remove or rewrite the docstring snippet so it does not contain a bare `print()`
|
||||
|
||||
#### TASK F-6 — Move all API calls out of config tab and dialog components into hooks
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.2 — Components must not call API functions.
|
||||
|
||||
**Files affected (all in `frontend/src/components/config/`):**
|
||||
@@ -341,6 +351,8 @@ For each component listed:
|
||||
|
||||
#### TASK F-7 — Move `SetupGuard` API call into a hook
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.2 — Components must not contain a `useEffect` that calls an API function.
|
||||
|
||||
**Files affected:**
|
||||
@@ -359,6 +371,8 @@ For each component listed:
|
||||
|
||||
#### TASK F-8 — Move `ServerTab` direct API calls into hooks
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.2 — Components must not call API functions.
|
||||
|
||||
**Files affected:**
|
||||
@@ -380,6 +394,8 @@ For each component listed:
|
||||
|
||||
#### TASK F-9 — Move `TimezoneProvider` API call into a hook
|
||||
|
||||
**Status:** Completed ✅
|
||||
|
||||
**Violated rule:** Refactoring.md §3.2 — A component (including a provider component) must not contain a `useEffect` that calls an API function directly; API calls belong in `src/hooks/`.
|
||||
|
||||
**Files affected:**
|
||||
|
||||
Reference in New Issue
Block a user