diff --git a/src/app/dashboard/admin/user-management/page.tsx b/src/app/dashboard/admin/user-management/page.tsx index b2bd5e4..2fa4689 100644 --- a/src/app/dashboard/admin/user-management/page.tsx +++ b/src/app/dashboard/admin/user-management/page.tsx @@ -1,20 +1,213 @@ -"use-client"; -import { Header } from "@/components/dashboard/header"; +"use client" +import { Header } from "@/components/dashboard/header" +import { useState } from "react" +// Dummy sample data (replace with your data source) +const stats = [ + { label: "Writers", value: 257, icon: "👨‍💻" }, + { label: "Verified Writers", value: 83, icon: "✅" }, + { label: "Readers", value: 1093, icon: "📖" }, + { label: "Subscribed Readers", value: 204, icon: "🔄" }, + { label: "Total Users", value: 257, icon: "👥" }, +] -export default function UserManagment() { +const readers = [ + { + name: "Jane Doe", + wallet: "0xABC...789", + joined: "27 May,2025", + purchased: 13, + rank: "Bookworm", + }, + { + name: "Ole Paul", + wallet: "0xABC...789", + joined: "7 June,2025", + purchased: 3, + rank: "Enthusiast", + }, + { + name: "Aminu Sani", + wallet: "0xABC...789", + joined: "27 May,2025", + purchased: 9, + rank: "Scholar", + }, + { + name: "Faith Adamu", + wallet: "0xABC...789", + joined: "7 June,2025", + purchased: 11, + rank: "Connoisseur", + }, + { + name: "Wood Word", + wallet: "0xABC...789", + joined: "27 May,2025", + purchased: 4, + rank: "Scholar", + }, +] + +export default function UserManagement() { + const [activeTab, setActiveTab] = useState("Readers") + const [search, setSearch] = useState("") return ( <> -
-
-
-

User Management

-

- Welcome to user management section of the admin dashboard! Here, you can manage all aspects of user accounts, including registration, profiles, and permissions. This space is designed to help you maintain a secure and organized user base, ensuring that users have the appropriate access and capabilities within your platform. -

+
+
+ {/* ==== STATS GRID ==== */} +
+ {stats.slice(0, 4).map((stat) => ( +
+
+
{stat.value}
+
{stat.label}
+
+
{stat.icon}
+
+ ))} + {/* Show Total Users in a single full-width box */} +
+
+
{stats[4].value}
+
{stats[4].label}
+
+
{stats[4].icon}
+
+
+ + {/* ==== USER TABLE CARD ==== */} +
+ {/* Smaller Top Bar: Tabs + Search + Sort/Filter */} +
+ {/* Tabs */} +
+ + +
+ + {/* Search, Sort, Filter */} +
+ {/* Search */} +
+ setSearch(e.target.value)} + style={{ width: 200, height: 32 }} + /> + + + + + + +
+ {/* Sort */} + + {/* Filter */} + +
+
+ + {/* Table */} +
+ + + + + + + + + + + + {readers + .filter((r) => r.name.toLowerCase().includes(search.toLowerCase())) + .map((reader) => ( + + + + + + + + + ))} + +
Reader NameWallet AddressJoined DateBooks PurchasedReading Rank +
{reader.name}{reader.wallet}{reader.joined}{reader.purchased}{reader.rank} + + View Profile + +
+
Showing 1 to 5 of 12
+
- ); + ) }