diff --git a/web/app/docs/installation/page.tsx b/web/app/docs/installation/page.tsx index daf8fe2..dc15858 100644 --- a/web/app/docs/installation/page.tsx +++ b/web/app/docs/installation/page.tsx @@ -30,3 +30,4 @@ export default function InstallationPage() { ) } + diff --git a/web/components/CopyableCode.tsx b/web/components/CopyableCode.tsx index 9baee04..26c939f 100644 --- a/web/components/CopyableCode.tsx +++ b/web/components/CopyableCode.tsx @@ -3,17 +3,20 @@ import type React from "react" import { useState } from "react" import { Copy, Check } from "lucide-react" +import { cn } from "@/lib/utils" interface CopyableCodeProps { code: string + language?: string + className?: string } -const CopyableCode: React.FC = ({ code }) => { +const CopyableCode: React.FC = ({ code, language, className }) => { const [isCopied, setIsCopied] = useState(false) const copyToClipboard = async () => { try { - await navigator.clipboard.writeText(code) + await navigator.clipboard.writeText(decodeURIComponent(code)) setIsCopied(true) setTimeout(() => setIsCopied(false), 2000) } catch (err) { @@ -22,16 +25,16 @@ const CopyableCode: React.FC = ({ code }) => { } return ( -
-
-        {code}
+    
+
+        
       
) @@ -39,4 +42,3 @@ const CopyableCode: React.FC = ({ code }) => { export default CopyableCode -