Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getProfile = () => {
logCallback('Get Profile Start', setProfileLoading(true));
KakaoLogins.getProfile()
.then(result => {
setProfile(result);
logCallback(
`Get Profile Finished:${JSON.stringify(result)}`,
setProfileLoading(false),
);
})
.catch(err => {
logCallback(
`Get Profile Failed:${err.code} ${err.message}`,
setProfileLoading(false),
);
});
};