"use client"; import { useState } from "react"; import { Check, Copy } from "lucide-react"; interface CustomCodeBlockProps { code: string; } const CustomCodeBlock = ({ code }: CustomCodeBlockProps) => { const [copied, setCopied] = useState(false); const handleCopy = async () => { await navigator.clipboard.writeText(code); setCopied(true); setTimeout(() => setCopied(false), 2000); }; const highlightCode = (text: string) => { return text.replace( /(\S+@\S+)/g, '$1', ); }; return (