File tree 4 files changed +11
-8
lines changed 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,7 @@ export default function ChallengeTags(props) {
99
99
) )
100
100
}
101
101
{
102
- matchScore > 0 && config . ENABLE_RECOMMENDER && _ . get ( meta , 'challengeListing.enableRecommenderTool' ) && (
102
+ matchScore > 0 && config . ENABLE_RECOMMENDER && (
103
103
< span styleName = "matchScoreWrap" >
104
104
< MatchScore score = { calculateScore ( matchScore ) } />
105
105
</ span >
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export default function FiltersPanel({
67
67
setExpanded,
68
68
setSort,
69
69
selectBucket,
70
- meta ,
70
+ enableRecommenderTool ,
71
71
} ) {
72
72
if ( hidden && ! expanded ) {
73
73
return (
@@ -253,7 +253,7 @@ export default function FiltersPanel({
253
253
const past = isPastBucket ( activeBucket ) ;
254
254
const disableClearFilterButtons = isFilterEmpty ( filterState , past ? 'past' : '' , activeBucket ) ;
255
255
256
- const isRecommendedChallengesVisible = ( activeBucket === 'openForRegistration' && config . ENABLE_RECOMMENDER && _ . get ( meta , 'challengeListing. enableRecommenderTool' ) ) ;
256
+ const isRecommendedChallengesVisible = ( activeBucket === 'openForRegistration' && config . ENABLE_RECOMMENDER && enableRecommenderTool ) ;
257
257
const [ recommendedToggle , setRecommendedToggle ] = useState ( false ) ;
258
258
259
259
useEffect ( ( ) => {
@@ -715,9 +715,5 @@ FiltersPanel.propTypes = {
715
715
setExpanded : PT . func . isRequired ,
716
716
setSort : PT . func . isRequired ,
717
717
selectBucket : PT . func . isRequired ,
718
- meta : PT . shape ( {
719
- challengeListing : PT . shape ( {
720
- enableRecommenderTool : PT . bool ,
721
- } ) ,
722
- } ) . isRequired ,
718
+ enableRecommenderTool : PT . bool . isRequired ,
723
719
} ;
Original file line number Diff line number Diff line change @@ -180,6 +180,7 @@ export default function ChallengeListing(props) {
180
180
isAuth = { Boolean ( auth . user ) }
181
181
setFilterState = { props . setFilterState }
182
182
hidden = { ! desktop }
183
+ enableRecommenderTool = { props . enableRecommenderTool }
183
184
/>
184
185
</ div >
185
186
@@ -209,6 +210,7 @@ ChallengeListing.defaultProps = {
209
210
loadMoreReviewOpportunities : null ,
210
211
newChallengeDetails : false ,
211
212
openChallengesInNewTabs : false ,
213
+ enableRecommenderTool : true ,
212
214
reviewOpportunities : [ ] ,
213
215
preListingMsg : null ,
214
216
prizeMode : 'money-usd' ,
@@ -258,6 +260,7 @@ ChallengeListing.propTypes = {
258
260
loadMoreReviewOpportunities : PT . func ,
259
261
newChallengeDetails : PT . bool ,
260
262
openChallengesInNewTabs : PT . bool ,
263
+ enableRecommenderTool : PT . bool ,
261
264
preListingMsg : PT . node ,
262
265
prizeMode : PT . string ,
263
266
reviewOpportunities : PT . arrayOf ( PT . shape ( ) ) ,
Original file line number Diff line number Diff line change @@ -56,6 +56,9 @@ export default function ChallengeListingRoute({
56
56
openChallengesInNewTabs = {
57
57
_ . get ( meta , 'challengeListing.openChallengesInNewTabs' )
58
58
}
59
+ enableRecommenderTool = {
60
+ _ . get ( meta , 'challengeListing.enableRecommenderTool' )
61
+ }
59
62
preListingMsg = { preListingMsg }
60
63
prizeMode = { prizeMode }
61
64
/>
@@ -86,6 +89,7 @@ ChallengeListingRoute.propTypes = {
86
89
meta : PT . shape ( {
87
90
challengeListing : PT . shape ( {
88
91
openChallengesInNewTabs : PT . bool ,
92
+ enableRecommenderTool : PT . bool ,
89
93
} ) ,
90
94
communityId : PT . string . isRequired ,
91
95
communityName : PT . string . isRequired ,
You can’t perform that action at this time.
0 commit comments