diff --git a/src/app/p/[secret]/page.tsx b/src/app/p/[secret]/page.tsx index 09fdb2b..fcbb0d2 100644 --- a/src/app/p/[secret]/page.tsx +++ b/src/app/p/[secret]/page.tsx @@ -1,15 +1,18 @@ "use client"; import { useState } from "react"; +import Link from "next/link"; +import { usePathname } from "next/navigation"; import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query"; import { useTRPC } from "@/trpc/client"; -import { Flag, Clock, TriangleAlert, TrendingUp, ShieldAlert, Info } from "lucide-react"; +import { Flag, Clock, TriangleAlert, TrendingUp, ShieldAlert, Info, ChevronRight } from "lucide-react"; import { TimeSeriesChart } from "@/components/admin/TimeSeriesChart"; import { GranularityToggle, type Granularity } from "@/components/admin/GranularityToggle"; import { Button } from "@/components/ui/button"; import { Card, CardHeader, CardTitle, CardDescription, CardAction, CardContent } from "@/components/ui/card"; export default function AdminDashboard() { + const pathname = usePathname(); const trpc = useTRPC(); const qc = useQueryClient(); const { data: stats, isLoading } = useQuery(trpc.admin.getStats.queryOptions()); @@ -95,8 +98,18 @@ export default function AdminDashboard() {

Needs attention

- - + +
@@ -247,31 +260,38 @@ export default function AdminDashboard() { /** * The only stat tiles with individual weight and color — color means * "this needs action" (orange when > 0), not a decorative per-item hue. + * Each one links straight to the queue it summarizes. */ function AttentionStat({ icon: Icon, label, value, + href, }: { icon: React.ElementType; label: string; value: number; + href: string; }) { const needsAttention = value > 0; return ( -
-
+

{value.toLocaleString()}

{label}

-
+ + ); }