Skip to content

Commit

Permalink
feat(AddSystemsToGroupModal): Remove unnecessary function creation
Browse files Browse the repository at this point in the history
  • Loading branch information
LiorKGOW authored and gkarat committed Mar 26, 2024
1 parent 6c2368a commit f7ae6d7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ const AddSystemsToGroupModal = ({
[isModalOpen]
);

const calculateSelected = () => (selected ? selected.size : 0);
const numOfSelectedSystems = selected ? selected.size : 0;

const handleModalClose = () => {
if (calculateSelected() > 0) {
if (numOfSelectedSystems > 0) {
dispatch(selectEntity(-1, false));
}
dispatch(clearFilters());
Expand Down

0 comments on commit f7ae6d7

Please sign in to comment.