Add dashboard navigation and request timeouts

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.
This commit is contained in:
NotII
2025-10-30 18:35:09 +00:00
parent fcba1a853d
commit f0d18a9e67
9 changed files with 70 additions and 19 deletions

View File

@@ -12,6 +12,7 @@ import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from "@/components/ui/alert-dialog";
import { UserX, Shield, Search, Ban, Unlock } from "lucide-react";
import { useState } from "react";
import Link from "next/link";
export default function AdminBanPage() {
const [banData, setBanData] = useState({
@@ -62,9 +63,14 @@ export default function AdminBanPage() {
return (
<div className="space-y-6">
<div>
<h1 className="text-2xl font-semibold tracking-tight">Ban Users</h1>
<p className="text-sm text-muted-foreground mt-1">Manage user bans and suspensions</p>
<div className="flex items-center justify-between">
<div>
<h1 className="text-2xl font-semibold tracking-tight">Ban Users</h1>
<p className="text-sm text-muted-foreground mt-1">Manage user bans and suspensions</p>
</div>
<Button asChild variant="outline" size="sm">
<Link href="/dashboard">Back to Dashboard</Link>
</Button>
</div>
{/* Stats Cards */}