Skip to content

Commit

Permalink
Merge branch 'main' into SBRP-111-remove-redundant-code
Browse files Browse the repository at this point in the history
  • Loading branch information
simyanyi committed Nov 7, 2023
2 parents a0027e7 + 9c6d15a commit 7c58dbc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client/src/components/pages/RoleListing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ const RoleListing = ({

// RoleList component ====================================================
useEffect(() => {
getRoleListings(user);
if (roleListings.length === 0 || (filters.role.length === 0 && filters.department.length === 0 && filters.location.length === 0)) {
getRoleListings(user);
}
if (roles.length === 0) {
getRoles();
}
Expand All @@ -67,7 +69,7 @@ const RoleListing = ({

setTimeout(() => {
setDataLoaded(true);
}, roleListings.length === 0 ? 3000 : 200);
}, 3000);

const date = new Date();

Expand Down

0 comments on commit 7c58dbc

Please sign in to comment.