'use client' import { RiClipboardFill, RiClipboardLine, } from '@remixicon/react' import { useClipboard } from 'foxact/use-clipboard' import { useCallback } from 'react' import { useTranslation } from 'react-i18next' import ActionButton from '@/app/components/base/action-button' import Tooltip from '@/app/components/base/tooltip' import copyStyle from './style.module.css' type Props = { content: string className?: string } const prefixEmbedded = 'overview.appInfo.embedded' const CopyFeedback = ({ content }: Props) => { const { t } = useTranslation() const { copied, copy, reset } = useClipboard() const handleCopy = useCallback(() => { copy(content) }, [copy, content]) return ( {copied && } {!copied && } ) } export default CopyFeedback export const CopyFeedbackNew = ({ content, className }: Pick) => { const { t } = useTranslation() const { copied, copy, reset } = useClipboard() const handleCopy = useCallback(() => { copy(content) }, [copy, content]) return ( ) }