-
Notifications
You must be signed in to change notification settings - Fork 69
Open
Description
getUserNameByPrincipal(auth.identity.getPrincipal()).then((userName) => {
if (userName) {
// User exists! Set user and redirect to /feed.
getUserFromCanister(Array.isArray(userName)?userName[userName.length-1]:userName).then((user) => {
setIsCheckingICForUser(false);
auth.setUser(user!);
history.replace("/feed");
});
setIsCheckingICForUser(false);
} else {
// Do nothing. Allow the user to create a userId
setIsCheckingICForUser(false);
}
userName is array ,origin code case error
Metadata
Metadata
Assignees
Labels
No labels