Skip to content

Commit aeadce7

Browse files
committed
add specific var for wipro topgear
1 parent bd48ca5 commit aeadce7

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

src/server/tc-communities/wipro/metadata.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
},
88
"challengeListing": {
99
"ignoreCommunityFilterByDefault": true,
10-
"openChallengesInNewTabs": false
10+
"openChallengesInNewTabs": false,
11+
"enableRecommenderTool": false,
1112
},
1213
"communityId": "wipro",
1314
"communityName": "TopGear Community",

src/shared/components/challenge-detail/Header/ChallengeTags.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export default function ChallengeTags(props) {
3939
technPlatforms,
4040
setChallengeListingFilter,
4141
openForRegistrationChallenges,
42+
meta,
4243
} = props;
4344

4445
let EventTag;
@@ -98,7 +99,7 @@ export default function ChallengeTags(props) {
9899
))
99100
}
100101
{
101-
matchScore > 0 && config.ENABLE_RECOMMENDER && (
102+
matchScore > 0 && config.ENABLE_RECOMMENDER && _.get(meta, 'challengeListing.enableRecommenderTool') && (
102103
<span styleName="matchScoreWrap">
103104
<MatchScore score={calculateScore(matchScore)} />
104105
</span>
@@ -146,4 +147,9 @@ ChallengeTags.propTypes = {
146147
setChallengeListingFilter: PT.func.isRequired,
147148
challengeType: PT.shape().isRequired,
148149
openForRegistrationChallenges: PT.shape().isRequired,
150+
meta: PT.shape({
151+
challengeListing: PT.shape({
152+
enableRecommenderTool: PT.bool,
153+
}),
154+
}).isRequired,
149155
};

src/shared/components/challenge-listing/Filters/FiltersPanel/index.jsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ export default function FiltersPanel({
6767
setExpanded,
6868
setSort,
6969
selectBucket,
70+
meta,
7071
}) {
7172
if (hidden && !expanded) {
7273
return (
@@ -252,7 +253,7 @@ export default function FiltersPanel({
252253
const past = isPastBucket(activeBucket);
253254
const disableClearFilterButtons = isFilterEmpty(filterState, past ? 'past' : '', activeBucket);
254255

255-
const isRecommendedChallengesVisible = (activeBucket === 'openForRegistration' && config.ENABLE_RECOMMENDER);
256+
const isRecommendedChallengesVisible = (activeBucket === 'openForRegistration' && config.ENABLE_RECOMMENDER && _.get(meta, 'challengeListing.enableRecommenderTool'));
256257
const [recommendedToggle, setRecommendedToggle] = useState(false);
257258

258259
useEffect(() => {
@@ -714,4 +715,9 @@ FiltersPanel.propTypes = {
714715
setExpanded: PT.func.isRequired,
715716
setSort: PT.func.isRequired,
716717
selectBucket: PT.func.isRequired,
718+
meta: PT.shape({
719+
challengeListing: PT.shape({
720+
enableRecommenderTool: PT.bool,
721+
}),
722+
}).isRequired,
717723
};

0 commit comments

Comments
 (0)