import Link from "next/link"; import { StatusBadge } from "@/components/StatusBadge"; import type { NodeRecord, SystemRecord } from "@/lib/types"; interface Props { node: NodeRecord; system?: SystemRecord; } export function NodeCard({ node, system }: Props) { const lastSeen = node.last_seen ? new Date(node.last_seen).toLocaleTimeString() : "never"; return (

{node.name}

{node.node_id}

System {system?.name ?? "Unassigned"}
Location {node.lat != null && node.lon != null ? `${node.lat.toFixed(4)}, ${node.lon.toFixed(4)}` : "Unknown"}
Last seen {lastSeen}
{!node.configured && (
⚠ Needs configuration
)}
); }