Skip to content
This repository has been archived by the owner on Feb 1, 2024. It is now read-only.

Commit

Permalink
FIXUP use constant instead of string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
jwalgran committed May 13, 2019
1 parent 0aeb695 commit ca65c8c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/app/src/components/FacilityListItemsTable.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,17 @@ class FacilityListItemsTable extends Component {
} = this.props;

const params = createParamsFromQueryString(search);
if (params.status && params.status.includes('POTENTIAL_MATCH') && items && prevProps.items) {
const previousPotentialMatchCount = prevProps.items.filter(x => x.status === 'POTENTIAL_MATCH').length;
const currentPotentialMatchCount = items.filter(x => x.status === 'POTENTIAL_MATCH').length;
if (params.status
&& params.status.includes(facilityListItemStatusChoicesEnum.POTENTIAL_MATCH)
&& items
&& prevProps.items) {
const previousPotentialMatchCount = prevProps
.items
.filter(x => x.status === facilityListItemStatusChoicesEnum.POTENTIAL_MATCH)
.length;
const currentPotentialMatchCount = items
.filter(x => x.status === facilityListItemStatusChoicesEnum.POTENTIAL_MATCH)
.length;
if (previousPotentialMatchCount !== currentPotentialMatchCount) {
const {
page,
Expand Down

0 comments on commit ca65c8c

Please sign in to comment.