Skip to content

Commit

Permalink
Merge branch 'main' into chore/CE-860-861
Browse files Browse the repository at this point in the history
  • Loading branch information
afwilcox authored Jun 28, 2024
2 parents df8f9ed + 04a1ec2 commit ca1e67d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions frontend/src/app/store/reducers/complaints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,11 +577,17 @@ export const selectComplaintsByType =
export const selectTotalMappedComplaints = (state: RootState): number => {
const {
complaints: {
mappedItems: { items },
mappedItems: { items, unmapped },
},
} = state;

return items ? items.length : 0;
if (items && unmapped) {
return items.length + unmapped;
} else if (!items && !unmapped) {
return 0;
} else {
return 0 + unmapped;
}
};

export const selectTotalUnmappedComplaints = (state: RootState): number => {
Expand Down

0 comments on commit ca1e67d

Please sign in to comment.