From a25e038a8b0fa7610f4b8b85cce787d184b2555c Mon Sep 17 00:00:00 2001 From: Matri Date: Fri, 4 Aug 2023 10:49:13 +0800 Subject: [PATCH] fix: text copy issue (#723) --- .../app/overview/embedded/index.tsx | 3 +-- .../components/app/overview/share-link.tsx | 3 +-- .../develop/secret-key/secret-key-modal.tsx | 3 +-- .../invited-modal/invitation-link.tsx | 5 ++-- .../share/text-generation/result/header.tsx | 13 +++++----- web/hooks/use-copy-to-clipboard.ts | 26 ------------------- 6 files changed, 11 insertions(+), 42 deletions(-) delete mode 100644 web/hooks/use-copy-to-clipboard.ts diff --git a/web/app/components/app/overview/embedded/index.tsx b/web/app/components/app/overview/embedded/index.tsx index 3b150d70870c37..09c6838e1fd474 100644 --- a/web/app/components/app/overview/embedded/index.tsx +++ b/web/app/components/app/overview/embedded/index.tsx @@ -1,9 +1,9 @@ import React, { useEffect, useState } from 'react' import { useTranslation } from 'react-i18next' import cn from 'classnames' +import copy from 'copy-to-clipboard' import style from './style.module.css' import Modal from '@/app/components/base/modal' -import useCopyToClipboard from '@/hooks/use-copy-to-clipboard' import copyStyle from '@/app/components/app/chat/copy-btn/style.module.css' import Tooltip from '@/app/components/base/tooltip' import { useAppContext } from '@/context/app-context' @@ -52,7 +52,6 @@ const Embedded = ({ isShow, onClose, appBaseUrl, accessToken }: Props) => { const { t } = useTranslation() const [option, setOption] = useState