File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed
server/tc-communities/wipro
challenge-listing/Filters/FiltersPanel Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 7
7
},
8
8
"challengeListing" : {
9
9
"ignoreCommunityFilterByDefault" : true ,
10
- "openChallengesInNewTabs" : false
10
+ "openChallengesInNewTabs" : false ,
11
+ "enableRecommenderTool" : false ,
11
12
},
12
13
"communityId" : " wipro" ,
13
14
"communityName" : " TopGear Community" ,
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ export default function ChallengeTags(props) {
39
39
technPlatforms,
40
40
setChallengeListingFilter,
41
41
openForRegistrationChallenges,
42
+ meta,
42
43
} = props ;
43
44
44
45
let EventTag ;
@@ -98,7 +99,7 @@ export default function ChallengeTags(props) {
98
99
) )
99
100
}
100
101
{
101
- matchScore > 0 && config . ENABLE_RECOMMENDER && (
102
+ matchScore > 0 && config . ENABLE_RECOMMENDER && _ . get ( meta , 'challengeListing.enableRecommenderTool' ) && (
102
103
< span styleName = "matchScoreWrap" >
103
104
< MatchScore score = { calculateScore ( matchScore ) } />
104
105
</ span >
@@ -146,4 +147,9 @@ ChallengeTags.propTypes = {
146
147
setChallengeListingFilter : PT . func . isRequired ,
147
148
challengeType : PT . shape ( ) . isRequired ,
148
149
openForRegistrationChallenges : PT . shape ( ) . isRequired ,
150
+ meta : PT . shape ( {
151
+ challengeListing : PT . shape ( {
152
+ enableRecommenderTool : PT . bool ,
153
+ } ) ,
154
+ } ) . isRequired ,
149
155
} ;
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ export default function FiltersPanel({
67
67
setExpanded,
68
68
setSort,
69
69
selectBucket,
70
+ meta,
70
71
} ) {
71
72
if ( hidden && ! expanded ) {
72
73
return (
@@ -252,7 +253,7 @@ export default function FiltersPanel({
252
253
const past = isPastBucket ( activeBucket ) ;
253
254
const disableClearFilterButtons = isFilterEmpty ( filterState , past ? 'past' : '' , activeBucket ) ;
254
255
255
- const isRecommendedChallengesVisible = ( activeBucket === 'openForRegistration' && config . ENABLE_RECOMMENDER ) ;
256
+ const isRecommendedChallengesVisible = ( activeBucket === 'openForRegistration' && config . ENABLE_RECOMMENDER && _ . get ( meta , 'challengeListing.enableRecommenderTool' ) ) ;
256
257
const [ recommendedToggle , setRecommendedToggle ] = useState ( false ) ;
257
258
258
259
useEffect ( ( ) => {
@@ -714,4 +715,9 @@ FiltersPanel.propTypes = {
714
715
setExpanded : PT . func . isRequired ,
715
716
setSort : PT . func . isRequired ,
716
717
selectBucket : PT . func . isRequired ,
718
+ meta : PT . shape ( {
719
+ challengeListing : PT . shape ( {
720
+ enableRecommenderTool : PT . bool ,
721
+ } ) ,
722
+ } ) . isRequired ,
717
723
} ;
You can’t perform that action at this time.
0 commit comments