import * as React from "react"; import { DetailLink, DetailList, DetailSectionCard, Empty, LocalSystemCells, TextList, } from "@/components/detail/DetailList"; import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow, } from "@/components/ui/table"; import type { DetailLinkValue, SystemPageState, SystemRow, SystemVendorRow, } from "@/types/local-frontier"; export type SystemPagesProps = { page: SystemPageState; }; function LinkList({ links, }: { links: readonly DetailLinkValue[]; }): React.JSX.Element { return ( {links.map((link) => ( ))} ); } function SystemVendorTable({ rows, }: { rows: readonly SystemVendorRow[]; }): React.JSX.Element { if (!rows.length) return No system vendors.; return ( System vendor Systems Accelerator vendors Max memory Max bandwidth Lowest latest price {rows.map((row) => ( {row.systems} {row.maxMemory} {row.maxBandwidth} {row.lowestLatestPrice} ))}
); } function SystemsTable({ rows, }: { rows: readonly SystemRow[]; }): React.JSX.Element { if (!rows.length) return No systems.; return ( System Accelerator vendor Accelerators Memory Bandwidth Latest price {rows.map((row) => ( } row={row} vendor={row.acceleratorVendor} /> ))}
); } export function SystemPages({ page }: SystemPagesProps): React.JSX.Element { if (page.emptyMessage) return {page.emptyMessage}; return (
{page.summaryRows.length ? ( ) : null} {page.vendors.length ? ( ) : null} {page.systems.length || page.kind === "vendor" ? ( ) : null}
); }