import { Cpu, MemoryStick, Star, WifiOff } from "lucide-react"; import type { CSSProperties } from "react"; import { Link } from "react-router-dom"; import type { Device } from "../api/types"; import { colorToHex, formatDate } from "../lib/utils"; import { Badge } from "./ui"; interface DeviceCardProps { device: Device; list?: boolean; moduleLabel?: string; } export function DeviceCard({ device, list = false, moduleLabel }: DeviceCardProps) { const color = colorToHex(device.state.colors?.[0]); const Icon = device.device_type === "dram" ? MemoryStick : Cpu; return
{[device.vendor, device.model].filter(Boolean).join(" · ") || device.source}