set loading to false in the finally stage

This commit is contained in:
Carter 2025-11-10 13:06:40 -06:00
parent 6143e0aba1
commit 181f1194e2

View file

@ -109,7 +109,7 @@ export default function Contract() {
setPermissions(resp.permissions);
});
}, [as, contractKey, userAPI, user]);
useEffect(() => {
if (!loading) {
setLoading(true);
@ -145,7 +145,9 @@ export default function Contract() {
})
.catch(err => {
//setInvalid(true);
});
}).finally(() => {
setLoading(false)
})
}
}, [contractKey, contractAPI, as]); // eslint-disable-line react-hooks/exhaustive-deps