'use client' import React, { useState } from 'react' import { useTranslation } from 'react-i18next' import { debounce } from 'lodash-es' import copy from 'copy-to-clipboard' import Tooltip from '../tooltip' import TooltipPlus from '../tooltip-plus' import copyStyle from './style.module.css' type Props = { content: string selectorId: string className?: string } const prefixEmbedded = 'appOverview.overview.appInfo.embedded' const CopyFeedback = ({ content, selectorId, className }: Props) => { const { t } = useTranslation() const [isCopied, setIsCopied] = useState(false) const onClickCopy = debounce(() => { copy(content) setIsCopied(true) }, 100) const onMouseLeave = debounce(() => { setIsCopied(false) }, 100) return (
) } export default CopyFeedback export const CopyFeedbackNew = ({ content, className }: Pick) => { const { t } = useTranslation() const [isCopied, setIsCopied] = useState(false) const onClickCopy = debounce(() => { copy(content) setIsCopied(true) }, 100) const onMouseLeave = debounce(() => { setIsCopied(false) }, 100) return (
) }