'use client' import { useState } from 'react' const CopyIcon = () => ( ) const CheckIcon = () => ( ) export const RichTextCodeBlock: React.FC<{ code: string language?: string title?: string }> = ({ code, language, title }) => { const [copied, setCopied] = useState(false) const handleCopy = async () => { await navigator.clipboard.writeText(code) setCopied(true) setTimeout(() => setCopied(false), 2000) } return (
{title || language || 'code'}
        
          {code}
        
      
) }