From 9f603df57a92912ae7a541dec5e136d9abdfddbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=B6=9B?= Date: Mon, 6 Jan 2025 15:14:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E8=87=AA=E5=8A=A8=E5=9C=A8?= =?UTF-8?q?=E9=A2=9C=E8=89=B2=E5=80=BC=E5=89=8D=E9=9D=A2=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?#=E7=9A=84=E5=8A=9F=E8=83=BD=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/useCopyColor.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/hooks/useCopyColor.ts b/src/hooks/useCopyColor.ts index b96a7c2..595482d 100644 --- a/src/hooks/useCopyColor.ts +++ b/src/hooks/useCopyColor.ts @@ -8,11 +8,7 @@ export function useCopyColor() { const [cpState, copyToClipboard] = useCopyToClipboard(); const copyAction = useCallback((color: string) => { if (isNil(color)) return; - if (color.startsWith('#')) { - copyToClipboard(color); - } else { - copyToClipboard(`#${color}`); - } + copyToClipboard(color); }, []); useEffect(() => {