Skip to content

Commit

Permalink
[FIX] https환경에서 카카오톡 공유 불가 버그 픽스
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun1211 committed Feb 9, 2025
1 parent d970f87 commit 5570e2f
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/pages/eventCalendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ const EventCalendar = () => {
script.src = "https://developers.kakao.com/sdk/js/kakao.js"; // 카카오톡 SDK
script.async = true;
document.body.appendChild(script);
window.Kakao.init(KAKAO_SHARE_KEY);

return () => {
document.body.removeChild(script); // return으로 제거
};
Expand Down Expand Up @@ -94,10 +92,11 @@ const KakaoShare = async() => {
if (window.Kakao === undefined) {
return;
}
window.Kakao.init(KAKAO_SHARE_KEY);

if (!window.Kakao.isInitialized()) {
window.Kakao.init(KAKAO_SHARE_KEY);
}
// if (!window.Kakao.isInitialized()) {
// window.Kakao.init(KAKAO_SHARE_KEY);
// }


window.Kakao.Link.sendDefault({
Expand Down

0 comments on commit 5570e2f

Please sign in to comment.