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