Move constant inline styles into makeStyles

This commit is contained in:
2026-04-21 18:47:18 +02:00
parent 86a7336ac0
commit 4da2703966
7 changed files with 67 additions and 14 deletions

View File

@@ -354,7 +354,11 @@ const source = timeRange === "24h" ? "fail2ban" : "archive";
---
### TASK-018 — Move inline `style={{…}}` objects to `makeStyles`
### TASK-018 — Move inline `style={{…}}` objects to `makeStyles` (done)
**Where fixed:** `frontend/src/pages/MapPage.tsx`, `frontend/src/pages/DashboardPage.tsx`, `frontend/src/pages/jail/PatternsSection.tsx`, `frontend/src/pages/jails/BanUnbanForm.tsx`, `frontend/src/layouts/MainLayout.tsx`, `frontend/src/pages/jails/jailsPageStyles.ts`
**Summary:** Moved constant inline style objects into `makeStyles` classes and used `mergeClasses` for dynamic button layout in `MainLayout`. Kept runtime-dependent opacity and collapse state as conditional class application.
**Where found:** 30+ instances across `frontend/src/pages/MapPage.tsx`, `frontend/src/pages/map/MapBansTable.tsx`, `frontend/src/pages/DashboardPage.tsx`, `frontend/src/pages/jail/PatternsSection.tsx`, `frontend/src/pages/jails/BanUnbanForm.tsx`, `frontend/src/layouts/MainLayout.tsx`, and others.