File tree 2 files changed +10
-3
lines changed
src/shared/components/challenge-listing/Listing 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import React, { useRef } from 'react';
12
12
import Sort from 'utils/challenge-listing/sort' ;
13
13
// import { NO_LIVE_CHALLENGES_CONFIG, BUCKETS, BUCKET_DATA }
14
14
// from 'utils/challenge-listing/buckets';
15
- import { BUCKET_DATA } from 'utils/challenge-listing/buckets' ;
15
+ import { NO_LIVE_CHALLENGES_CONFIG , BUCKET_DATA } from 'utils/challenge-listing/buckets' ;
16
16
import SortingSelectBar from 'components/SortingSelectBar' ;
17
17
import Waypoint from 'react-waypoint' ;
18
18
// import { challenge as challengeUtils } from 'topcoder-react-lib';
@@ -102,6 +102,13 @@ export default function Bucket({
102
102
// );
103
103
// }
104
104
105
+ if ( sortedChallenges . length === 0 ) {
106
+ return (
107
+ < div styleName = "no-results" >
108
+ { `${ NO_LIVE_CHALLENGES_CONFIG [ bucket ] } ` }
109
+ </ div >
110
+ ) ;
111
+ }
105
112
const cards = sortedChallenges . map ( challenge => (
106
113
< ChallengeCard
107
114
challenge = { challenge }
Original file line number Diff line number Diff line change @@ -184,9 +184,9 @@ function Listing({
184
184
return (
185
185
< div styleName = "challengeCardContainer" >
186
186
{ preListingMsg }
187
- { auth . user ? getBucket ( BUCKETS . MY ) : null }
187
+ { ( auth . user && myChallenges . length > 0 ) ? getBucket ( BUCKETS . MY ) : null }
188
188
{ /* {extraBucket ? getBucket(extraBucket) : null} */ }
189
- { getBucket ( BUCKETS . OPEN_FOR_REGISTRATION ) }
189
+ { openForRegistrationChallenges . length > 0 && getBucket ( BUCKETS . OPEN_FOR_REGISTRATION ) }
190
190
{ /* {getBucket(BUCKETS.ONGOING)} */ }
191
191
</ div >
192
192
) ;
You can’t perform that action at this time.
0 commit comments