"use client"; import { TrendingUp, BookOpen, RefreshCw } from "lucide-react"; import { useDashboard } from "@/lib/hooks/useDashboard"; import { BillCard } from "@/components/shared/BillCard"; import { adminAPI } from "@/lib/api"; import { useState } from "react"; export default function DashboardPage() { const { data, isLoading, refetch } = useDashboard(); const [polling, setPolling] = useState(false); const triggerPoll = async () => { setPolling(true); try { await adminAPI.triggerPoll(); setTimeout(() => { refetch(); setPolling(false); }, 3000); } catch { setPolling(false); } }; return (

Dashboard

Your personalized Congressional activity feed

{isLoading ? (
Loading dashboard...
) : (

Your Feed {data?.follows && ( ({data.follows.bills} bills · {data.follows.members} members · {data.follows.topics} topics) )}

{!data?.feed?.length ? (

Your feed is empty.

Follow bills, members, or topics to see activity here.

) : (
{data.feed.map((bill) => ( ))}
)}

Trending

{!data?.trending?.length ? (
No trend data yet. Run a poll to populate.
) : (
{data.trending.map((bill) => ( ))}
)}
)}
); }