feat(manage): add dashboard as manage landing page

- Add Dashboard as first sidebar nav item under Overview section
- Update /manage page to render DashboardOverview instead of redirecting
- Remove redirect to /manage/users
This commit is contained in:
2026-04-30 20:49:32 +08:00
parent ce3c88ec54
commit 5fba98cd3d
2 changed files with 15 additions and 2 deletions
+12 -2
View File
@@ -1,5 +1,15 @@
import { redirect } from "next/navigation" import { DashboardOverview } from "@/components/manage/dashboard-overview";
export default function ManagePage() { export default function ManagePage() {
redirect("/manage/users") return (
<div className="space-y-6">
<div>
<h1 className="text-2xl font-bold">Dashboard</h1>
<p className="text-sm text-zinc-400">
Overview of DeckyVault statistics and moderation queue
</p>
</div>
<DashboardOverview />
</div>
);
} }
+3
View File
@@ -18,6 +18,9 @@ type NavItem =
| { type: "link"; href: string; label: string; icon: React.ElementType } | { type: "link"; href: string; label: string; icon: React.ElementType }
const navItems: NavItem[] = [ const navItems: NavItem[] = [
{ type: "section", label: "Overview" },
{ type: "link", href: "/manage", label: "Dashboard", icon: LayoutDashboardIcon },
{ type: "divider" },
{ type: "section", label: "Management" }, { type: "section", label: "Management" },
{ type: "link", href: "/manage/users", label: "Users", icon: UsersIcon }, { type: "link", href: "/manage/users", label: "Users", icon: UsersIcon },
{ type: "link", href: "/manage/hardware", label: "Hardware", icon: CpuIcon }, { type: "link", href: "/manage/hardware", label: "Hardware", icon: CpuIcon },