"use client"; import { useState } from "react"; interface Props { cmd: string; copyLabel?: string; copiedLabel?: string; } export function InstallCodeBlock({ cmd, copyLabel = "Copy", copiedLabel = "Copied ✓" }: Props) { const [copied, setCopied] = useState(false); const copy = () => { if (typeof navigator !== "undefined" && navigator.clipboard) { navigator.clipboard.writeText(cmd); setCopied(true); setTimeout(() => setCopied(false), 1400); } }; return (
{cmd}