Bugfix: Fix loop when auto_login = true (#1641)

🐛 (typesStore.ts): set loading to false when an error occurs during fetching types to prevent infinite loading state
This commit is contained in:
Cristhian Zanforlin Lousa 2024-04-08 15:43:42 -03:00 committed by GitHub
commit 6f52312fe9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -29,6 +29,7 @@ export const useTypesStore = create<TypesStoreType>((set, get) => ({
.catch((error) => {
console.error("An error has occurred while fetching types.");
console.log(error);
setLoading(false);
reject();
});
});