TypeScript 61.9%
HTML 37.2%
SQL 0.7%
1import type { Metadata } from 'next';2import Link from 'next/link';3import { PageHeader } from '@/components/ui/page-header';4import { Card, CardHeader, EmptyState } from '@/components/ui/primitives';5import { SalesTable } from '@/components/market/sales-table';6import { Thumb, GradeBadge, SourceLink } from '@/components/market/bits';7import { getRecordSales, getTopSales } from '@/lib/queries/market-lists';8import { fmtDate, fmtMoney } from '@/lib/format';9import { catName } from '@/lib/taxonomy';1011export const metadata: Metadata = { title: 'Record sales', description: 'The highest verified collectible sales tracked by RareIndex, overall and per category.' };12export const revalidate = 300;1314export default async function RecordsPage() {15 const [records, top] = await Promise.all([getRecordSales(), getTopSales(100)]);16 return (17 <div>18 <PageHeader kicker="Records" title="Record sales" description="Highest verified transactions per collectible family (§154). Only sales with confidence ≥ 80% and a source link qualify; private treaty sales reported without documentation are excluded." />19 {records.length ? (20 <div className="grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4">21 {records.map((r) => (22 <Link key={r.id} href={r.assetSlug ? `/asset/${r.assetSlug}` : '/sales'} className="card flex gap-3 p-3 hover:border-border-strong">23 <Thumb src={r.heroImageUrl ?? r.imageUrls[0]} alt="" size={64} rounded="rounded-md" />24 <span className="min-w-0 flex-1">25 <span className="block text-[10px] font-semibold uppercase tracking-wider text-subtle">{catName(r.familySlug)}</span>26 <span className="block truncate text-[13px] font-medium text-fg">{r.assetTitle ?? r.rawTitle}</span>27 <span className="num block text-lg font-semibold text-fg">{fmtMoney(r.priceUsd)}</span>28 <span className="flex flex-wrap items-center gap-1.5 text-[11px] text-muted">29 <GradeBadge grader={r.grader} grade={r.grade} />30 {fmtDate(r.saleDate)} · <SourceLink name={r.sourceName} url={r.sourceUrl} />31 </span>32 </span>33 </Link>34 ))}35 </div>36 ) : (37 <Card>38 <EmptyState title="No verified record sales yet" description="Records populate as auction results and marketplace sales are ingested and matched." />39 </Card>40 )}41 <Card className="mt-6 overflow-hidden">42 <CardHeader title="Top 100 verified sales" subtitle="All categories, by USD at the historical exchange rate" />43 <SalesTable items={top} />44 </Card>45 </div>46 );47}48