● Zion Boggan
repos/Docket/app/search/page.tsx
zionboggan.com ↗
67 lines · tsx
History for this file →
1
import type { Metadata } from "next";
2
import Link from "next/link";
3
import { Suspense } from "react";
4
import { PageHeader } from "@/components/ui";
5
import { SearchBrowser } from "@/components/search-browser";
6
 
7
export const metadata: Metadata = {
8
  title: "Search",
9
  description:
10
    "Look up a bill, member, agency, or topic across the official record.",
11
};
12
 
13
export const revalidate = 300;
14
 
15
export default function SearchPage() {
16
  return (
17
    <div
18
      className="mx-auto w-full max-w-[860px] px-6 sm:px-8"
19
      style={{
20
        paddingTop: "clamp(32px, 6vw, 56px)",
21
        paddingBottom: "clamp(48px, 8vw, 80px)",
22
      }}
23
    >
24
      {}
25
      <Link
26
        href="/"
27
        className="focus-ring tap no-underline hover:underline"
28
        style={{
29
          display: "inline-flex",
30
          alignItems: "center",
31
          gap: "8px",
32
          fontFamily: "var(--font-mono), ui-monospace, monospace",
33
          fontSize: "13px",
34
          letterSpacing: "0.08em",
35
          color: "var(--dk-signal)",
36
          marginBottom: "32px",
37
        }}
38
      >
39
        ← Home
40
      </Link>
41
 
42
      <PageHeader
43
        eyebrow="Look it up"
44
        title="Search the record"
45
        lead="Look up a bill, a member of Congress, a state, an agency, or a topic. Every result links to its official source."
46
      />
47
 
48
      <Suspense fallback={<SearchSkeleton />}>
49
        <SearchBrowser />
50
      </Suspense>
51
    </div>
52
  );
53
}
54
 
55
function SearchSkeleton() {
56
  return (
57
    <div className="space-y-4">
58
      <div className="h-14 w-full animate-pulse rounded-sm bg-graphite" />
59
      <div className="mt-6 h-8 w-64 animate-pulse rounded-sm bg-graphite" />
60
      <div className="mt-6 space-y-3">
61
        {Array.from({ length: 8 }).map((_, i) => (
62
          <div key={i} className="h-12 w-full animate-pulse rounded-sm bg-graphite" />
63
        ))}
64
      </div>
65
    </div>
66
  );
67
}