Skip to content

Commit

Permalink
HOTFIX: KAKAO 로그인 버튼 동작하도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
DeveloperRyou committed May 19, 2024
1 parent 338775e commit e43b03e
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/assist/buttonwrapper/KakaoLoginButtonWrapper.tsx
Original file line number Diff line number Diff line change
@@ -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 (
<FlexBox className="px-4 w-full justify-center">
<div className="w-full max-w-[360px]">
Expand Down

0 comments on commit e43b03e

Please sign in to comment.