"use client"; import { use } from "react"; import Link from "next/link"; import { ArrowLeft, ExternalLink, User } from "lucide-react"; import { useBill, useBillTrend } from "@/lib/hooks/useBills"; import { AIBriefCard } from "@/components/bills/AIBriefCard"; import { ActionTimeline } from "@/components/bills/ActionTimeline"; import { TrendChart } from "@/components/bills/TrendChart"; import { NewsPanel } from "@/components/bills/NewsPanel"; import { FollowButton } from "@/components/shared/FollowButton"; import { billLabel, formatDate, partyBadgeColor, cn } from "@/lib/utils"; export default function BillDetailPage({ params }: { params: Promise<{ id: string }> }) { const { id } = use(params); const billId = decodeURIComponent(id); const { data: bill, isLoading } = useBill(billId); const { data: trendData } = useBillTrend(billId, 30); if (isLoading) { return
Loading bill...
; } if (!bill) { return (

Bill not found.

← Back to bills
); } const label = billLabel(bill.bill_type, bill.bill_number); return (
{/* Header */}
{label} {bill.chamber} 119th Congress

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

{bill.sponsor && (
{bill.sponsor.name} {bill.sponsor.party && ( {bill.sponsor.party} )} {bill.sponsor.state && {bill.sponsor.state}}
)}

Introduced: {formatDate(bill.introduced_date)} {bill.congress_url && ( congress.gov )}

{/* Content grid */}
); }