From cbf744f02f3a249d75e716e99d24768715d4611c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=A1=B0=EC=98=88=EC=A7=84?= Date: Sat, 30 Nov 2024 23:23:08 +0900 Subject: [PATCH] fix: use settimeout --- src/features/ProfileShare/ProfileShareBottomSheet.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/features/ProfileShare/ProfileShareBottomSheet.tsx b/src/features/ProfileShare/ProfileShareBottomSheet.tsx index 69adf04..f3824f8 100644 --- a/src/features/ProfileShare/ProfileShareBottomSheet.tsx +++ b/src/features/ProfileShare/ProfileShareBottomSheet.tsx @@ -35,8 +35,10 @@ export const ProfileShareBottomSheet = ({ }, [infoId, mutateAsync]); const onClickShareLink = async () => { - await navigator.clipboard.writeText((await generateLink()) ?? ''); - toast.success('링크가 복사되었습니다', { icon: null }); + const link = (await generateLink()) ?? ''; + setTimeout(() => { + navigator.clipboard.writeText(link).then(() => toast.success('링크가 복사되었습니다', { icon: null })); + }, 0); }; const onClickShareKakao = async () => {