Skip to content

Commit f012012

Browse files
committed
fix: count is different for search result
1 parent d2c563e commit f012012

File tree

2 files changed

+6
-1
lines changed
  • src/shared/components/challenge-listing

2 files changed

+6
-1
lines changed

src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ export default function FiltersPanel({
7272
setExpanded,
7373
setSort,
7474
selectBucket,
75+
reviewCount,
7576
}) {
7677
if (hidden && !expanded) {
7778
return (
@@ -386,6 +387,7 @@ export default function FiltersPanel({
386387
isReviewer={isReviewerOrAdmin(auth)}
387388
selectBucket={selectBucket}
388389
past={past}
390+
reviewCount={reviewCount}
389391
/>
390392
</div>
391393
</div>
@@ -759,6 +761,7 @@ FiltersPanel.defaultProps = {
759761
onClose: _.noop,
760762
expanding: false,
761763
disabled: false,
764+
reviewCount: 0,
762765
};
763766

764767
FiltersPanel.propTypes = {
@@ -789,4 +792,5 @@ FiltersPanel.propTypes = {
789792
selectBucket: PT.func.isRequired,
790793
expanding: PT.bool,
791794
disabled: PT.bool,
795+
reviewCount: PT.number,
792796
};

src/shared/components/challenge-listing/Sidebar/BucketSelector/Bucket/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ function Bucket({
9595
}}
9696
/>
9797
<span styleName="bucketName">{BUCKET_DATA[bucket].name}</span>
98-
{(bucket !== BUCKETS.ALL && count > 0 && !loading) ? <span styleName="count">{count}</span> : null}
98+
{(bucket !== BUCKETS.ALL && bucket !== BUCKETS.REVIEW_OPPORTUNITIES && count > 0 && !loading) ? <span styleName="count">{count}</span> : null}
99+
{(bucket === BUCKETS.REVIEW_OPPORTUNITIES && count > 0) ? <span styleName="count">{count}</span> : null}
99100
</div>
100101
);
101102
}

0 commit comments

Comments
 (0)