Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import React, { useRef } from 'react';
import Sort from 'utils/challenge-listing/sort';
// import { NO_LIVE_CHALLENGES_CONFIG, BUCKETS, BUCKET_DATA }
// from 'utils/challenge-listing/buckets';
import { BUCKET_DATA } from 'utils/challenge-listing/buckets';
import { NO_LIVE_CHALLENGES_CONFIG, BUCKET_DATA } from 'utils/challenge-listing/buckets';
import SortingSelectBar from 'components/SortingSelectBar';
import Waypoint from 'react-waypoint';
// import { challenge as challengeUtils } from 'topcoder-react-lib';
Expand Down Expand Up @@ -102,6 +102,13 @@ export default function Bucket({
// );
// }

if (sortedChallenges.length === 0) {
return (
<div styleName="no-results">
{ `${NO_LIVE_CHALLENGES_CONFIG[bucket]}` }
</div>
);
}
const cards = sortedChallenges.map(challenge => (
<ChallengeCard
challenge={challenge}
Expand Down
4 changes: 2 additions & 2 deletions src/shared/components/challenge-listing/Listing/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,9 @@ function Listing({
return (
<div styleName="challengeCardContainer">
{preListingMsg}
{auth.user ? getBucket(BUCKETS.MY) : null}
{(auth.user && myChallenges.length > 0) ? getBucket(BUCKETS.MY) : null}
{/* {extraBucket ? getBucket(extraBucket) : null} */}
{getBucket(BUCKETS.OPEN_FOR_REGISTRATION)}
{openForRegistrationChallenges.length > 0 && getBucket(BUCKETS.OPEN_FOR_REGISTRATION)}
{/* {getBucket(BUCKETS.ONGOING)} */}
</div>
);
Expand Down