KakaoLogin.js
611 Bytes
import React from 'react';
import getRecommend from "../../scripts/getRecommend";
const KakaoLoginBtn = () => {
const KakaoLogin = function () {
window.Kakao.Auth.login({
success: getRecommend,
fail: function (err) {
console.log("login failed", err);
}
})
}
return (
<div>
<button onClick={KakaoLogin}
a id="custom-login-btn" href="javascript:loginWithKakao()">
<img
src="//k.kakaocdn.net/14/dn/btqCn0WEmI3/nijroPfbpCa4at5EIsjyf0/o.jpg"
width="140"
/>
</button>
</div>
);
};
export default KakaoLoginBtn