import React, { useState } from 'react' const LANG_COLORS = { javascript: '#f7df1e', bash: '#4eaa25', c: '#00599c', python: '#3776ab', } export default function CodeBlock({ block, lang, labels }) { const [copied, setCopied] = useState(false) const handleCopy = () => { navigator.clipboard.writeText(block.code).then(() => { setCopied(true) setTimeout(() => setCopied(false), 2000) }) } return (
{block.language} {block.title[lang]}
        {block.code}
      
) }