"use client"; import { TrendingUp, BookOpen, Flame } from "lucide-react"; import Link from "next/link"; import { useDashboard } from "@/lib/hooks/useDashboard"; import { BillCard } from "@/components/shared/BillCard"; import { WelcomeBanner } from "@/components/shared/WelcomeBanner"; import { useAuthStore } from "@/stores/authStore"; export default function DashboardPage() { const { data, isLoading } = useDashboard(); const token = useAuthStore((s) => s.token); return (

Dashboard

Your personalized Congressional activity feed

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

{token ? : } {token ? "Your Feed" : "Most Popular"} {token && data?.follows && ( ({data.follows.bills} bills · {data.follows.members} members · {data.follows.topics} topics) )}

{!token ? (

Sign in to personalise this feed with bills and members you follow.

Register Sign in
{data?.trending?.length ? (
{data.trending.map((bill) => ( ))}
) : null}
) : !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.
) : (
{data.trending.map((bill) => ( ))}
)}
)}
); }