Skip to content

Commit f14f861

Browse files
committed
fix(challenge-listing): add NO_LIVE_CHALLENGES messsage to All bucket in case of 0 challenges
1 parent fbe8ea2 commit f14f861

File tree

1 file changed

+8
-2
lines changed
  • src/shared/components/challenge-listing/Listing

1 file changed

+8
-2
lines changed

src/shared/components/challenge-listing/Listing/index.jsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import React from 'react';
77
import PT from 'prop-types';
88
import { connect } from 'react-redux';
99
import {
10-
BUCKETS, isReviewOpportunitiesBucket,
10+
BUCKETS, isReviewOpportunitiesBucket, NO_LIVE_CHALLENGES_CONFIG,
1111
// BUCKETS, getBuckets, isReviewOpportunitiesBucket, NO_LIVE_CHALLENGES_CONFIG,
1212
} from 'utils/challenge-listing/buckets';
1313
// import { challenge as challengeUtils } from 'topcoder-react-lib';
@@ -181,14 +181,20 @@ function Listing({
181181
// </div>
182182
// );
183183
// }
184-
return (
184+
return challenges.length > 0 ? (
185185
<div styleName="challengeCardContainer">
186186
{preListingMsg}
187187
{(auth.user && myChallenges.length > 0) ? getBucket(BUCKETS.MY) : null}
188188
{/* {extraBucket ? getBucket(extraBucket) : null} */}
189189
{openForRegistrationChallenges.length > 0 && getBucket(BUCKETS.OPEN_FOR_REGISTRATION)}
190190
{/* {getBucket(BUCKETS.ONGOING)} */}
191191
</div>
192+
) : (
193+
<div styleName="challengeCardContainer">
194+
<div styleName="no-results">
195+
{ `${NO_LIVE_CHALLENGES_CONFIG[activeBucket]}` }
196+
</div>
197+
</div>
192198
);
193199
}
194200

0 commit comments

Comments
 (0)