From c5147921ed361178817d5d9fb7e4a472b7db3c3a Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 24 Jul 2026 19:00:22 +0000 Subject: [PATCH] Fix low-contrast dark-theme text and Users row overlap on 6 admin pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Analytics, Press Releases, Live Streams, Audit Reports, Procurement, and Users were built with dark-theme classes (text-white, text-green- 200/*, bg-white/5, border-white/10) assuming a dark page background, but the admin content area is actually light (bg-slate-50) — headings, subtitles, stat labels, search placeholders, and pagination text were all rendering nearly invisible (white/pale-green on white). Converted all six to the light theme already used correctly elsewhere in the admin panel (LGA Approvals, Wards, Payments, Allocations). The Users list row had the same non-stacking layout bug fixed earlier on LGA Approvals — avatar, name, badges, and Suspend/Ban buttons were forced into one non-wrapping row, so on mobile names and emails truncated to a single character ("K…", "ke…") and buttons crowded the text. Now stacks properly on narrow screens. Also found the root cause of a stray corrupted byte discovered while editing press-releases: the previous session's arrow-mojibake fix (sed replacing "â†" with "←") left a dangling C1 control byte (U+0090) immediately after the arrow in 5 files, invisible in normal viewing but preventing exact-string edits on those lines. Fixed at the byte level and confirmed zero remaining control-character corruption across the whole app/ tree. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01UPJE5cNDtQ4j7yeg9Xjtxw --- app/(admin)/admin/analytics/page.tsx | 82 +++++++++++------------ app/(admin)/admin/audit-reports/page.tsx | 16 ++--- app/(admin)/admin/lgas/page.tsx | 2 +- app/(admin)/admin/live-streams/page.tsx | 6 +- app/(admin)/admin/press-releases/page.tsx | 18 ++--- app/(admin)/admin/procurement/page.tsx | 18 ++--- app/(admin)/admin/revenue/page.tsx | 2 +- app/(admin)/admin/users/page.tsx | 68 ++++++++++--------- 8 files changed, 107 insertions(+), 105 deletions(-) diff --git a/app/(admin)/admin/analytics/page.tsx b/app/(admin)/admin/analytics/page.tsx index c5b44ad..5d6c40d 100644 --- a/app/(admin)/admin/analytics/page.tsx +++ b/app/(admin)/admin/analytics/page.tsx @@ -43,24 +43,24 @@ function StatCard({ icon: Icon, label, value, sub, color = "text-green-600" }: { sub?: string; color?: string; }) { return ( -
+
-
+
-

{label}

+

{label}

-

{value}

- {sub &&

{sub}

} +

{value}

+ {sub &&

{sub}

}
); } function nairaK(koboStr: string) { const naira = (koboStr && koboStr !== "0" ? Number(BigInt(koboStr)) : 0) / 100; - if (naira >= 1_000_000) return `₦${(naira / 1_000_000).toFixed(1)}M`; - if (naira >= 1_000) return `₦${(naira / 1_000).toFixed(1)}K`; - return `₦${naira.toFixed(2)}`; + if (naira >= 1_000_000) return `₦${(naira / 1_000_000).toFixed(1)}M`; + if (naira >= 1_000) return `₦${(naira / 1_000).toFixed(1)}K`; + return `₦${naira.toFixed(2)}`; } export default function AdminAnalyticsPage() { @@ -78,14 +78,14 @@ export default function AdminAnalyticsPage() { if (loading) { return (
- {[0,1,2].map((i) =>
)} + {[0,1,2].map((i) =>
)}
); } if (!data) { return ( -
+
Failed to load analytics.
); @@ -102,10 +102,10 @@ export default function AdminAnalyticsPage() {
- -

Platform Analytics

+ +

Platform Analytics

-

Real-time overview of platform activity

+

Real-time overview of platform activity

{/* Key metrics */} @@ -123,22 +123,22 @@ export default function AdminAnalyticsPage() { {/* Charts */}
{/* Monthly revenue bar chart */} -
-

Monthly Revenue (₦)

+
+

Monthly Revenue (₦)

{revenueChartData.length === 0 ? ( -
+
No revenue data yet
) : ( - - - `₦${(Number(v) / 1000).toFixed(0)}K`} /> + + + `₦${(Number(v) / 1000).toFixed(0)}K`} /> [`₦${Number(v).toLocaleString()}`, "Revenue"]} + contentStyle={{ background: "#fff", border: "1px solid #e2e8f0", borderRadius: 12, color: "#0f172a" }} + formatter={(v) => [`₦${Number(v).toLocaleString()}`, "Revenue"]} /> @@ -147,8 +147,8 @@ export default function AdminAnalyticsPage() {
{/* LGA status pie */} -
-

LGA Status Breakdown

+
+

LGA Status Breakdown

[v, name]} /> @@ -167,37 +167,37 @@ export default function AdminAnalyticsPage() {
{/* User role breakdown */} -
-

User Breakdown by Role

+
+

User Breakdown by Role

{userRoleData.map(({ name, value }) => ( -
-

{value.toLocaleString()}

-

{name.replace("_", " ")}

+
+

{value.toLocaleString()}

+

{name.replace("_", " ")}

))}
{/* Top LGAs by posts */} -
-
- -

Top LGAs by Content

+
+
+ +

Top LGAs by Content

{data.topLgasByPosts.length === 0 ? ( -
No data yet
+
No data yet
) : ( -
+
{data.topLgasByPosts.map((lga, idx) => (
- {idx + 1} + {idx + 1}
-

{lga.lgaName} LGA

-

{lga.state} · {lga.status}

+

{lga.lgaName} LGA

+

{lga.state} · {lga.status}

-
- +
+ {lga._count.posts}
diff --git a/app/(admin)/admin/audit-reports/page.tsx b/app/(admin)/admin/audit-reports/page.tsx index 6da7a43..93d53d4 100644 --- a/app/(admin)/admin/audit-reports/page.tsx +++ b/app/(admin)/admin/audit-reports/page.tsx @@ -119,10 +119,10 @@ export default function AdminAuditReportsPage() {
- -

Audit Reports

+ +

Audit Reports

-

{total.toLocaleString()} audit report records

+

{total.toLocaleString()} audit report records

@@ -192,13 +192,13 @@ export default function AdminAuditReportsPage() { {/* Pagination */} {Math.ceil(total / PAGE) > 1 && ( -
-

Showing {page * PAGE + 1}–{Math.min((page + 1) * PAGE, total)} of {total}

+
+

Showing {page * PAGE + 1}–{Math.min((page + 1) * PAGE, total)} of {total}

+ className="px-4 py-2 rounded-xl border border-slate-200 text-slate-600 text-sm disabled:opacity-40 hover:bg-slate-50">← Prev + className="px-4 py-2 rounded-xl border border-slate-200 text-slate-600 text-sm disabled:opacity-40 hover:bg-slate-50">Next →
)} diff --git a/app/(admin)/admin/lgas/page.tsx b/app/(admin)/admin/lgas/page.tsx index f47ac93..2932408 100644 --- a/app/(admin)/admin/lgas/page.tsx +++ b/app/(admin)/admin/lgas/page.tsx @@ -637,7 +637,7 @@ export default function AdminLGAsPage() {
))}
@@ -265,13 +265,13 @@ export default function AdminPressReleasesPage() { {/* Pagination */} {Math.ceil(total / PAGE) > 1 && ( -
-

Showing {page * PAGE + 1}–{Math.min((page + 1) * PAGE, total)} of {total}

+
+

Showing {page * PAGE + 1}–{Math.min((page + 1) * PAGE, total)} of {total}

+ className="px-4 py-2 rounded-xl border border-slate-200 text-slate-600 text-sm disabled:opacity-40 hover:bg-slate-50">← Prev + className="px-4 py-2 rounded-xl border border-slate-200 text-slate-600 text-sm disabled:opacity-40 hover:bg-slate-50">Next →
)} diff --git a/app/(admin)/admin/procurement/page.tsx b/app/(admin)/admin/procurement/page.tsx index 7f7da0e..115cf25 100644 --- a/app/(admin)/admin/procurement/page.tsx +++ b/app/(admin)/admin/procurement/page.tsx @@ -124,10 +124,10 @@ export default function AdminProcurementPage() {
- -

Procurement Contracts

+ +

Procurement Contracts

-

{total.toLocaleString()} contract records

+

{total.toLocaleString()} contract records

@@ -192,13 +192,13 @@ export default function AdminProcurementPage() { {/* Pagination */} {Math.ceil(total / PAGE) > 1 && ( -
-

Showing {page * PAGE + 1}–{Math.min((page + 1) * PAGE, total)} of {total}

+
+

Showing {page * PAGE + 1}–{Math.min((page + 1) * PAGE, total)} of {total}

+ className="px-4 py-2 rounded-xl border border-slate-200 text-slate-600 text-sm disabled:opacity-40 hover:bg-slate-50">← Prev + className="px-4 py-2 rounded-xl border border-slate-200 text-slate-600 text-sm disabled:opacity-40 hover:bg-slate-50">Next →
)} @@ -254,7 +254,7 @@ export default function AdminProcurementPage() { {[ { key: "title", label: "Contract Title *", placeholder: "e.g. Construction of Ward 3 Road" }, { key: "contractor", label: "Contractor Name *", placeholder: "e.g. ABC Construction Ltd" }, - { key: "value", label: "Contract Value (₦) *", placeholder: "e.g. 15000000" }, + { key: "value", label: "Contract Value (₦) *", placeholder: "e.g. 15000000" }, ].map(({ key, label, placeholder }) => (
diff --git a/app/(admin)/admin/revenue/page.tsx b/app/(admin)/admin/revenue/page.tsx index 3337047..07455b3 100644 --- a/app/(admin)/admin/revenue/page.tsx +++ b/app/(admin)/admin/revenue/page.tsx @@ -166,7 +166,7 @@ export default function AdminRevenuePage() { - `₦${(v / 1000).toFixed(0)}k`} /> + `₦${(v / 1000).toFixed(0)}k`} /> new Intl.NumberFormat("en-NG", { diff --git a/app/(admin)/admin/users/page.tsx b/app/(admin)/admin/users/page.tsx index 4cce163..4bc0578 100644 --- a/app/(admin)/admin/users/page.tsx +++ b/app/(admin)/admin/users/page.tsx @@ -132,18 +132,18 @@ export default function AdminUsersPage() {
- -

User Management

+ +

User Management

-

{total.toLocaleString()} total accounts

+

{total.toLocaleString()} total accounts

{/* Role tabs */} -
+
{ROLE_TABS.map(({ label, value }) => ( @@ -157,15 +157,15 @@ export default function AdminUsersPage() { setSearch(e.target.value)} - className="w-full pl-9 pr-4 py-2.5 rounded-xl border border-white/20 bg-white/10 text-white placeholder:text-green-200/40 text-sm focus:outline-none focus:border-green-400" + className="w-full pl-9 pr-4 py-2.5 rounded-xl border border-slate-200 bg-white text-slate-800 placeholder:text-slate-400 text-sm focus:outline-none focus:border-green-400" />
@@ -192,27 +192,29 @@ export default function AdminUsersPage() {
{users.map((user) => (
-
- {/* Avatar */} -
- {user.name.charAt(0).toUpperCase()} -
+
+
+ {/* Avatar */} +
+ {user.name.charAt(0).toUpperCase()} +
-
-
- {user.name} - - {user.isBanned && ( - BANNED - )} - {!user.isBanned && user.suspendedUntil && new Date(user.suspendedUntil) > new Date() && ( - SUSPENDED - )} +
+
+ {user.name} + + {user.isBanned && ( + BANNED + )} + {!user.isBanned && user.suspendedUntil && new Date(user.suspendedUntil) > new Date() && ( + SUSPENDED + )} +
+

{user.email}

-

{user.email}

-
+
{user.isBanned ? (