File tree 1 file changed +8
-7
lines changed
src/shared/components/challenge-listing/Filters
1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,13 @@ export default function ChallengeFilters({
43
43
validTypes,
44
44
// isSavingFilter,
45
45
} ) {
46
- // let filterRulesCount = 0;
47
- // if (filterState.tags) filterRulesCount += 1;
48
- // if (filterState.types) filterRulesCount += 1;
49
- // if (filterState.endDate || filterState.startDate) filterRulesCount += 1;
50
- // if (isReviewOpportunitiesBucket && filterState.reviewOpportunityType) filterRulesCount += 1;
51
- // if (selectedCommunityId !== '') filterRulesCount += 1;
46
+ let filterRulesCount = 0 ;
47
+ if ( filterState . groups && filterState . groups . length ) filterRulesCount += 1 ;
48
+ if ( filterState . tags && filterState . tags . length ) filterRulesCount += 1 ;
49
+ if ( filterState . types && filterState . types . length ) filterRulesCount += 1 ;
50
+ if ( filterState . endDateEnd || filterState . startDateStart ) filterRulesCount += 1 ;
51
+ if ( isReviewOpportunitiesBucket && filterState . reviewOpportunityType ) filterRulesCount += 1 ;
52
+ if ( selectedCommunityId !== '' && selectedCommunityId !== 'All' ) filterRulesCount += 1 ;
52
53
const isTrackOn = track => filterState . tracks [ track ] ;
53
54
54
55
const switchTrack = ( track , on ) => {
@@ -151,7 +152,7 @@ export default function ChallengeFilters({
151
152
</ span >
152
153
< FiltersSwitch
153
154
active = { expanded }
154
- // filtersCount={filterRulesCount}
155
+ filtersCount = { filterRulesCount }
155
156
onSwitch = { setExpanded }
156
157
styleName = "FiltersSwitch"
157
158
/>
You can’t perform that action at this time.
0 commit comments