@@ -99,74 +99,74 @@ export default function ChallengeListing(props) {
99
99
// );
100
100
// } else {
101
101
const challengeCardContainer = (
102
- < div styleName = "card-container" >
103
- {
104
- filterState . recommended
105
- && ! loadingOpenForRegistrationChallenges
106
- && activeBucket === 'openForRegistration'
107
- && ! openForRegistrationChallenges . length && (
108
- < NoChallengeCard />
109
- )
110
- }
111
- < ChallengeSearchBar
112
- setFilterState = { props . setFilterState }
113
- />
114
- < Listing
115
- activeBucket = { activeBucket }
116
- auth = { props . auth }
117
- challenges = { challenges }
118
- openForRegistrationChallenges = { openForRegistrationChallenges }
119
- myChallenges = { myChallenges }
120
- myPastChallenges = { myPastChallenges }
121
- allChallenges = { allChallenges }
122
- pastChallenges = { pastChallenges }
123
- challengesUrl = { props . challengesUrl }
124
- communityName = { props . communityName }
125
- expandedTags = { props . expandedTags }
126
- expandTag = { props . expandTag }
127
- // extraBucket={extraBucket}
128
- filterState = { props . filterState }
129
- keepPastPlaceholders = { keepPastPlaceholders }
130
- loadingPastChallenges = { props . loadingPastChallenges }
131
- loadingMyChallenges = { props . loadingMyChallenges }
132
- loadingMyPastChallenges = { props . loadingMyPastChallenges }
133
- loadingAllChallenges = { props . loadingAllChallenges }
134
- loadingOpenForRegistrationChallenges = { props . loadingOpenForRegistrationChallenges }
135
- loadingOnGoingChallenges = { props . loadingOnGoingChallenges }
136
- loadingReviewOpportunities = { props . loadingReviewOpportunities }
137
- loadMoreMy = { props . loadMoreMy }
138
- loadMoreMyPast = { props . loadMoreMyPast }
139
- loadMoreAll = { props . loadMoreAll }
140
- loadMoreOpenForRegistration = { props . loadMoreOpenForRegistration }
141
- loadMoreOnGoing = { props . loadMoreOnGoing }
142
- loadMorePast = { props . loadMorePast }
143
- loadMoreReviewOpportunities = { props . loadMoreReviewOpportunities }
144
- newChallengeDetails = { props . newChallengeDetails }
145
- openChallengesInNewTabs = { props . openChallengesInNewTabs }
146
- preListingMsg = { preListingMsg }
147
- prizeMode = { props . prizeMode }
148
- reviewOpportunities = { props . reviewOpportunities }
149
- selectBucket = { props . selectBucket }
150
- selectChallengeDetailsTab = { props . selectChallengeDetailsTab }
151
- selectedCommunityId = { props . selectedCommunityId }
152
- setFilterState = { props . setFilterState }
153
- setSort = { props . setSort }
154
- sorts = { props . sorts }
155
- loadMoreActive = { props . loadMoreActive }
156
- expanding = { expanding }
102
+ < Listing
103
+ activeBucket = { activeBucket }
104
+ auth = { props . auth }
105
+ challenges = { challenges }
106
+ openForRegistrationChallenges = { openForRegistrationChallenges }
107
+ myChallenges = { myChallenges }
108
+ myPastChallenges = { myPastChallenges }
109
+ allChallenges = { allChallenges }
110
+ pastChallenges = { pastChallenges }
111
+ challengesUrl = { props . challengesUrl }
112
+ communityName = { props . communityName }
113
+ expandedTags = { props . expandedTags }
114
+ expandTag = { props . expandTag }
115
+ // extraBucket={extraBucket}
116
+ filterState = { props . filterState }
117
+ keepPastPlaceholders = { keepPastPlaceholders }
118
+ loadingPastChallenges = { props . loadingPastChallenges }
119
+ loadingMyChallenges = { props . loadingMyChallenges }
120
+ loadingMyPastChallenges = { props . loadingMyPastChallenges }
121
+ loadingAllChallenges = { props . loadingAllChallenges }
122
+ loadingOpenForRegistrationChallenges = { props . loadingOpenForRegistrationChallenges }
123
+ loadingOnGoingChallenges = { props . loadingOnGoingChallenges }
124
+ loadingReviewOpportunities = { props . loadingReviewOpportunities }
125
+ loadMoreMy = { props . loadMoreMy }
126
+ loadMoreMyPast = { props . loadMoreMyPast }
127
+ loadMoreAll = { props . loadMoreAll }
128
+ loadMoreOpenForRegistration = { props . loadMoreOpenForRegistration }
129
+ loadMoreOnGoing = { props . loadMoreOnGoing }
130
+ loadMorePast = { props . loadMorePast }
131
+ loadMoreReviewOpportunities = { props . loadMoreReviewOpportunities }
132
+ newChallengeDetails = { props . newChallengeDetails }
133
+ openChallengesInNewTabs = { props . openChallengesInNewTabs }
134
+ preListingMsg = { preListingMsg }
135
+ prizeMode = { props . prizeMode }
136
+ reviewOpportunities = { props . reviewOpportunities }
137
+ selectBucket = { props . selectBucket }
138
+ selectChallengeDetailsTab = { props . selectChallengeDetailsTab }
139
+ selectedCommunityId = { props . selectedCommunityId }
140
+ setFilterState = { props . setFilterState }
141
+ setSort = { props . setSort }
142
+ sorts = { props . sorts }
143
+ loadMoreActive = { props . loadMoreActive }
144
+ expanding = { expanding }
157
145
// loadingActiveChallenges={props.loadingChallenges}
158
146
// userChallenges={props.userChallenges}
159
- isLoggedIn = { isLoggedIn }
160
- setSearchText = { setSearchText }
161
- />
162
- </ div >
147
+ isLoggedIn = { isLoggedIn }
148
+ setSearchText = { setSearchText }
149
+ />
163
150
) ;
164
- // }
165
151
166
152
const desktop = useMediaQuery ( { minWidth : 1024 } ) ;
153
+ const isRecommendedOn = filterState . recommended
154
+ && ! loadingOpenForRegistrationChallenges
155
+ && activeBucket === 'openForRegistration'
156
+ && ! openForRegistrationChallenges . length ;
167
157
168
158
return (
169
159
< div styleName = "ChallengeFiltersExample" id = "challengeFilterContainer" >
160
+ {
161
+ filterState . recommended
162
+ ? null
163
+ : (
164
+ < ChallengeSearchBar
165
+ setFilterState = { props . setFilterState }
166
+ />
167
+ )
168
+ }
169
+
170
170
< div styleName = "tc-content-wrapper" >
171
171
< div styleName = { desktop ? 'sidebar-container-desktop' : 'sidebar-container-mobile' } >
172
172
< Sidebar
@@ -183,7 +183,11 @@ export default function ChallengeListing(props) {
183
183
/>
184
184
</ div >
185
185
186
- { challengeCardContainer }
186
+ {
187
+ isRecommendedOn
188
+ ? < NoChallengeCard />
189
+ : challengeCardContainer
190
+ }
187
191
188
192
</ div >
189
193
</ div >
0 commit comments