set loading to false in the finally stage
This commit is contained in:
parent
6143e0aba1
commit
181f1194e2
1 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue