diff --git a/web/src/features/skill/install-command.tsx b/web/src/features/skill/install-command.tsx index 2c2157d4..12a18a32 100644 --- a/web/src/features/skill/install-command.tsx +++ b/web/src/features/skill/install-command.tsx @@ -1,4 +1,7 @@ -import { CopyButton } from '@/shared/components/copy-button' +import { useState } from 'react' +import { useTranslation } from 'react-i18next' +import { Check, Copy } from 'lucide-react' +import { Button } from '@/shared/ui/button' interface InstallCommandProps { namespace: string @@ -7,14 +10,40 @@ interface InstallCommandProps { } export function InstallCommand({ namespace, slug, version }: InstallCommandProps) { + const { t } = useTranslation() + const [copied, setCopied] = useState(false) const command = version ? `skillhub install ${namespace}/${slug}@${version}` : `skillhub install ${namespace}/${slug}` + const handleCopy = async () => { + try { + await navigator.clipboard.writeText(command) + setCopied(true) + window.setTimeout(() => setCopied(false), 2000) + } catch (err) { + console.error('Failed to copy:', err) + } + } + return ( -
- {command} - +
+ +
+        
+          {command}
+        
+      
) }