import Link from 'next/link'; import { OrbitBadge, StatusBadge, TypeBadge } from '@/components/ui/badges'; import { fmtDate, fmtDeg, fmtInt } from '@/lib/format'; import { routes } from '@/lib/site'; import type { SatelliteRow } from '@/lib/types'; export function ResultsTable({ rows }: { rows: SatelliteRow[] }) { return (
| Name | NORAD | COSPAR | Type | Status | Orbit | Perigee / apogee | Incl. | Launched | Operator | Country |
|---|---|---|---|---|---|---|---|---|---|---|
| {s.name} {s.constellation_name && {s.constellation_name}} | {s.norad_id ?? '—'} | {s.cospar_id ?? '—'} | {s.perigee_km !== null ? `${fmtInt(s.perigee_km)} / ${fmtInt(s.apogee_km)} km` : '—'} | {fmtDeg(s.inclination_deg)} | {fmtDate(s.launch_date)}{s.decay_date && ↓ {fmtDate(s.decay_date)}} | {s.operator_slug ? {s.operator_name} : s.owner_name ?? s.owner_code ?? '—'} | {s.country_slug ? {s.country_name} : '—'} |