"use client"; import Link from "next/link"; import { useMemo } from "react"; import { FreshnessLabel } from "@/components/ui/freshness"; import { LivePrice } from "@/components/ui/price"; import { StatusBadge } from "@/components/ui/status-badge"; import { cx, instrumentHref } from "@/lib/format"; import { useMarketStream } from "@/lib/stream"; import type { InstrumentWithQuote } from "@/lib/types"; /** Compact quote tiles for the homepage pulse. One row of tiles per asset class, scrollable on mobile. */ export function PulseRow({ title, href, items, className }: { title: string; href: string; items: InstrumentWithQuote[]; className?: string }) { const channels = useMemo(() => items.map((i) => `quotes:${i.id}`), [items]); useMarketStream(channels); if (!items.length) return null; return (

{title}

All →
{items.slice(0, 6).map((i) => (
{i.symbol}
{i.name}
))}
); }