fix: adding loading screen on the home page.

This commit is contained in:
sriram veeraghanta 2023-11-14 12:30:21 +05:30
parent b31041726b
commit ae077d06e8

View File

@ -77,9 +77,14 @@ export const SignInView = observer(() => {
);
const mutateUserInfo = useCallback(() => {
fetchCurrentUser().then((user) => {
handleLoginRedirection(user);
});
setLoading(true);
fetchCurrentUser()
.then((user) => {
handleLoginRedirection(user);
})
.catch(() => {
setLoading(false);
});
}, [fetchCurrentUser, handleLoginRedirection]);
useEffect(() => {