diff --git a/frontend/app/bills/page.tsx b/frontend/app/bills/page.tsx index fb010a9..fb43295 100644 --- a/frontend/app/bills/page.tsx +++ b/frontend/app/bills/page.tsx @@ -1,7 +1,8 @@ "use client"; import { useState } from "react"; -import { Search, Filter } from "lucide-react"; +import { useSearchParams } from "next/navigation"; +import { Search } from "lucide-react"; import { useBills } from "@/lib/hooks/useBills"; import { BillCard } from "@/components/shared/BillCard"; @@ -14,9 +15,10 @@ const TOPICS = [ ]; export default function BillsPage() { - const [q, setQ] = useState(""); - const [chamber, setChamber] = useState(""); - const [topic, setTopic] = useState(""); + const searchParams = useSearchParams(); + const [q, setQ] = useState(searchParams.get("q") ?? ""); + const [chamber, setChamber] = useState(searchParams.get("chamber") ?? ""); + const [topic, setTopic] = useState(searchParams.get("topic") ?? ""); const [page, setPage] = useState(1); const params = {