import type { Metadata } from 'next'; import Link from 'next/link'; import { PageHeader } from '@/components/ui/page-header'; import { Badge } from '@/components/ui/primitives'; import { getCategoryCounts } from '@/lib/queries/markets'; import { getCategoryThumbnails } from '@/lib/queries/assets'; import { Thumb } from '@/components/market/bits'; import { FAMILIES, getCategory } from '@rareindex/taxonomy'; import { fmtNum } from '@/lib/format'; import { INDICES } from '@rareindex/taxonomy'; export const metadata: Metadata = { title: 'Categories', description: 'The RareIndex collectible taxonomy: every family and subcategory tracked, with launch phase and live coverage.' }; export const revalidate = 300; export default async function CategoriesPage() { const counts = await getCategoryCounts(); const thumbs = await getCategoryThumbnails(FAMILIES.flatMap((f) => [f.slug, ...f.children])); const total = (slugs: string[]) => slugs.reduce((a, s) => a + (counts.get(s)?.assets ?? 0), 0); const groups = [1, 2, 3].map((phase) => ({ phase, families: FAMILIES.filter((f) => f.phase === phase) })); return (
{f.description}
: null} {f.children.length ? (