"use client"; import { use } from "react"; import { useQuery } from "@tanstack/react-query"; import Link from "next/link"; import { ExternalLink, Landmark } from "lucide-react"; import { shareAPI } from "@/lib/api"; import { AIBriefCard } from "@/components/bills/AIBriefCard"; import { billLabel } from "@/lib/utils"; export default function SharedBriefPage({ params }: { params: Promise<{ token: string }> }) { const { token } = use(params); const { data, isLoading, isError } = useQuery({ queryKey: ["share-brief", token], queryFn: () => shareAPI.getBrief(token), retry: false, }); return (
{/* Minimal header */}
PocketVeto
{isLoading && (
Loading…
)} {isError && (

Brief not found or link is invalid.

)} {data && ( <> {/* Bill label + title */}
{billLabel(data.bill.bill_type, data.bill.bill_number)}

{data.bill.short_title || data.bill.title || "Untitled Bill"}

{/* Full brief */} {/* CTAs */}
View full bill page Track this bill on PocketVeto →
)}
); }