Added 'Back to Dashboard' buttons to all admin dashboard pages for improved navigation. Introduced AbortSignal timeouts to API client and middleware requests to prevent hanging network calls. Also enabled messaging customers from the order details page if Telegram info is available.
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
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";
|
|
import { Button } from "@/components/ui/button";
|
|
import Link from "next/link";
|
|
|
|
export default function AdminPage() {
|
|
return (
|
|
<div className="space-y-6">
|
|
<div className="flex items-center justify-between">
|
|
<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>
|
|
<Button asChild variant="outline" size="sm">
|
|
<Link href="/dashboard">Back to Dashboard</Link>
|
|
</Button>
|
|
</div>
|
|
|
|
<div className="grid gap-4 lg:gap-6 sm:grid-cols-2 lg:grid-cols-3 items-stretch">
|
|
<SystemStatusCard />
|
|
<VendorsCard />
|
|
<InviteVendorCard />
|
|
<BanUserCard />
|
|
<RecentOrdersCard />
|
|
<InvitationsListCard />
|
|
|
|
{/* Disabled/hidden cards as requested */}
|
|
</div>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
|