import { Button, buttonVariants } from "@/components/ui/button"; import handleCopy from "@/components/handleCopy"; import { cn } from "@/lib/utils"; import { ClipboardIcon } from "lucide-react"; interface Item { interface?: string; port?: number; } const CopyButton = ({ label, value, }: { label: string; value: string | number; }) => ( {value} handleCopy(label, String(value))} className="size-4 cursor-pointer" /> ); export default function InterFaces({ item }: { item: Item }) { const { interface: iface, port } = item; return (
{iface || (port && port !== 0) ? (

{iface ? "Interface:" : "Default Port:"}

{" "}
) : null}
); }