"use client"; import { Check, Copy } from "lucide-react"; import { useState } from "react"; interface CommandDisplayProps { command: string; } export function CommandDisplay({ command }: CommandDisplayProps) { const [copied, setCopied] = useState(false); const copyToClipboard = async () => { await navigator.clipboard.writeText(command); setCopied(true); setTimeout(() => setCopied(false), 2000); }; return (
{command}
); }