fix: fix infinite loading screen

This commit is contained in:
Dawid Wysokiński 2022-04-24 09:53:29 +02:00 committed by GitHub
parent 44e30f43ff
commit f61a96ec1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -46,13 +46,13 @@ export function AuthProvider(props: AuthProviderProps) {
} catch (e) {
Sentry.captureException(e);
}
setLoading(false);
}, [setUser, setLoading, client, tokenStorage]);
}, [setUser, client, tokenStorage]);
useEffect(() => {
loadUser();
}, [loadUser]);
loadUser().finally(() => {
setLoading(false)
})
}, [loadUser, setLoading]);
const signIn: AuthContext['signIn'] = async (
email: string,