Skip to content

Commit

Permalink
fixed domain roles feature: related to #91
Browse files Browse the repository at this point in the history
  • Loading branch information
OlegPhenomenon committed Jul 5, 2021
1 parent 5fa4cab commit 4819d03
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/pages/HomePage/HomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,20 @@ const HomePage = ({

useEffect(() => {
if (domains.length === 0) {
if (isTech === 'init') {
(async () => {
await fetchDomains(0, false, isTech);
setIsLoading(false);
})();
} else {
(async () => {
await fetchDomains(0, false, isTech);
setIsLoading(false);
})();
}
} else {
(async () => {
await fetchDomains(0, false, isTech);
setIsLoading(false);
})();
}
else if (previousTechParams !== isTech) {
(async () => {
await fetchDomains(0, false, isTech);
setIsLoading(false);
})();
}
else {
setIsLoading(false);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [fetchDomains, isTech]);

if (isLoading) return <Loading />;
Expand Down

0 comments on commit 4819d03

Please sign in to comment.