import Link from "next/link"; import { StatusBadge } from "@/components/StatusBadge"; import type { NodeRecord, SystemRecord } from "@/lib/types"; interface Props { node: NodeRecord; system?: SystemRecord; /** * When false, the card renders without its `/nodes/[id]` Link wrapper so a * parent click handler can take the interaction (pending nodes open the * config modal instead of navigating). Defaults to true. */ linkToDetail?: boolean; } export function NodeCard({ node, system, linkToDetail = true }: Props) { const lastSeen = node.last_seen ? new Date(node.last_seen).toLocaleTimeString() : "never"; const body = (
{node.name}
{node.node_id}