diff --git a/web/features/deployments/detail/access-tab/common.tsx b/web/features/deployments/detail/access-tab/common.tsx index 956174e307..17dc5c4d98 100644 --- a/web/features/deployments/detail/access-tab/common.tsx +++ b/web/features/deployments/detail/access-tab/common.tsx @@ -3,7 +3,6 @@ import type { ReactNode } from 'react' import { cn } from '@langgenius/dify-ui/cn' import { toast } from '@langgenius/dify-ui/toast' -import { useRef } from 'react' import { useTranslation } from 'react-i18next' import { useClipboard } from '@/hooks/use-clipboard' @@ -40,22 +39,12 @@ type CopyPillProps = { export function CopyPill({ label, value, prefix, className }: CopyPillProps) { const { t } = useTranslation('deployments') - const copyFailedRef = useRef(false) const { copied, copy } = useClipboard({ - timeout: 1500, onCopyError: () => { - copyFailedRef.current = true toast.error(t('access.copyFailed')) }, }) - const handleCopy = async () => { - copyFailedRef.current = false - await copy(value) - if (!copyFailedRef.current) - toast.success(t('access.copyToast')) - } - return (