Add admin dashboard pages and restructure admin route
Introduces new admin dashboard pages for alerts, bans, invites, orders, settings, status, and vendors under app/dashboard/admin/. Moves the main admin page to the new dashboard structure and adds a shared admin layout. Updates sidebar configuration and adds supporting components and hooks for admin features.
This commit is contained in:
33
app/dashboard/admin/page.tsx
Normal file
33
app/dashboard/admin/page.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
import React from "react";
|
||||
import InviteVendorCard from "@/components/admin/InviteVendorCard";
|
||||
import BanUserCard from "@/components/admin/BanUserCard";
|
||||
import RecentOrdersCard from "@/components/admin/RecentOrdersCard";
|
||||
import SystemStatusCard from "@/components/admin/SystemStatusCard";
|
||||
import InvitationsListCard from "@/components/admin/InvitationsListCard";
|
||||
import VendorsCard from "@/components/admin/VendorsCard";
|
||||
|
||||
export default function AdminPage() {
|
||||
return (
|
||||
<div className="space-y-6">
|
||||
<div>
|
||||
<h1 className="text-2xl font-semibold tracking-tight">Admin</h1>
|
||||
<p className="text-sm text-muted-foreground mt-1">Restricted area. Only admin1 can access.</p>
|
||||
</div>
|
||||
|
||||
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3 items-stretch">
|
||||
<SystemStatusCard />
|
||||
<VendorsCard />
|
||||
<InviteVendorCard />
|
||||
<BanUserCard />
|
||||
<RecentOrdersCard />
|
||||
<InvitationsListCard />
|
||||
|
||||
{/* Disabled/hidden cards as requested */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user