From c9d221490caccbc010066bb6ad194ce8f378f1e0 Mon Sep 17 00:00:00 2001 From: su- <30166652+su-u@users.noreply.github.com> Date: Wed, 27 Dec 2023 23:08:15 +0900 Subject: [PATCH] =?UTF-8?q?message=E3=81=AE=E5=BD=A2=E5=BC=8F=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/uuid/Uuid.tsx | 1 - src/components/common/Form/CopyButton.tsx | 3 +- src/hooks/useCopy.tsx | 50 +++++++++-------------- 3 files changed, 21 insertions(+), 33 deletions(-) diff --git a/src/app/uuid/Uuid.tsx b/src/app/uuid/Uuid.tsx index 0bc88b2..9ae6173 100644 --- a/src/app/uuid/Uuid.tsx +++ b/src/app/uuid/Uuid.tsx @@ -20,7 +20,6 @@ export const Uuid: FC = () => { const title = 'UUIDの生成'; const { methods, selectData, control, output, onClickGenerateUUID, version, onClickClear } = useUuid(); - const { copy } = useCopy(); const requireName = version === 3 || version === 5; diff --git a/src/components/common/Form/CopyButton.tsx b/src/components/common/Form/CopyButton.tsx index 7abea4e..fbf513a 100644 --- a/src/components/common/Form/CopyButton.tsx +++ b/src/components/common/Form/CopyButton.tsx @@ -10,10 +10,11 @@ type Props = { }; export const CopyButton: FC = ({ copyText, size }) => { - const { copy } = useCopy(); + const { copy, contextHolder } = useCopy(); return ( + {contextHolder}