From e43b03e87a7e4198b6038dccbb774eb2646c92c3 Mon Sep 17 00:00:00 2001 From: DeveloperRyou Date: Sun, 19 May 2024 18:22:57 +0900 Subject: [PATCH] =?UTF-8?q?HOTFIX:=20KAKAO=20=EB=A1=9C=EA=B7=B8=EC=9D=B8?= =?UTF-8?q?=20=EB=B2=84=ED=8A=BC=20=EB=8F=99=EC=9E=91=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assist/buttonwrapper/KakaoLoginButtonWrapper.tsx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/assist/buttonwrapper/KakaoLoginButtonWrapper.tsx b/src/assist/buttonwrapper/KakaoLoginButtonWrapper.tsx index 23dc4aa..a8f301f 100644 --- a/src/assist/buttonwrapper/KakaoLoginButtonWrapper.tsx +++ b/src/assist/buttonwrapper/KakaoLoginButtonWrapper.tsx @@ -1,23 +1,18 @@ import LoginButton from "@modules/components/button/LoginButton"; import FlexBox from "@modules/layout/FlexBox"; -import { useEffect } from "react"; function KakaoLoginButtonWrapper() { const kakaoSDKLogin = () => { // eslint-disable-next-line @typescript-eslint/no-explicit-any const kakao = (window as any).Kakao; + if (!kakao?.isInitialized()) { + kakao?.init(process.env.NEXT_PUBLIC_KAKAO_JS_KEY); + } const redirectUri = `https://api.eolluga.com/login/oauth2/code/kakao`; kakao?.Auth?.authorize({ redirectUri, }); }; - useEffect(() => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any - const kakao = (window as any)?.Kakao; - if (!kakao?.isInitialized()) { - kakao?.init(process.env.NEXT_PUBLIC_KAKAO_JS_KEY); - } - }, []); return (