From f2acd6dccbac99f4ad743409d4c6eb3d28e12ebd Mon Sep 17 00:00:00 2001 From: haeun kim Date: Sun, 3 Dec 2023 17:27:20 +0900 Subject: [PATCH] =?UTF-8?q?:bug:=20=EB=B9=8C=EB=93=9C=20=EC=98=A4=EB=A5=98?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/detail/KakaoShareButton.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/detail/KakaoShareButton.tsx b/src/components/detail/KakaoShareButton.tsx index 5f16d94..f9c3646 100644 --- a/src/components/detail/KakaoShareButton.tsx +++ b/src/components/detail/KakaoShareButton.tsx @@ -9,14 +9,15 @@ interface KakaoShareButtonProps { const KakaoShareButton: FC = (props) => { const { id, name } = props; + const kakao = (window as any).Kakao; useEffect(() => { - Kakao.cleanup(); - Kakao.init(String(process.env.NEXT_PUBLIC_KAKAO_KEY)); + kakao.cleanup(); + kakao.init(String(process.env.NEXT_PUBLIC_KAKAO_KEY)); }, []); const handleShardClick = () => { - Kakao.Share.sendDefault({ + kakao.Share.sendDefault({ objectType: "feed", content: { title: name,