Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const kakaoLogout = () => {
logCallback('Logout Start', setLogoutLoading(true));
KakaoLogins.logout()
.then(result => {
setToken(TOKEN_EMPTY);
setProfile(PROFILE_EMPTY);
logCallback(`Logout Finished:${result}`, setLogoutLoading(false));
})
.catch(err => {
logCallback(
`Logout Failed:${err.code} ${err.message}`,
setLogoutLoading(false),
);
});
};