@@ -5,16 +5,16 @@ import PT from 'prop-types';
5
5
import _ from 'lodash' ;
6
6
import { TABS } from 'actions/page/dashboard' ;
7
7
8
- import { challenge as challengeUtils } from 'topcoder-react-lib' ;
8
+ // import { challenge as challengeUtils } from 'topcoder-react-lib';
9
9
10
- import Challenges from './Challenges' ;
11
- import Communities from './Communities' ;
10
+ // import Challenges from './Challenges';
11
+ // import Communities from './Communities';
12
12
import Header from './Header' ;
13
13
import Srms from './Srms' ;
14
14
15
15
import './styles.scss' ;
16
16
17
- const Filter = challengeUtils . filter ;
17
+ // const Filter = challengeUtils.filter;
18
18
19
19
/* eslint-disable react/no-unused-state */
20
20
@@ -52,44 +52,46 @@ export default class MyChallenges extends React.Component {
52
52
53
53
render ( ) {
54
54
const {
55
- challengeFilter,
56
- challenges,
57
- challengesLoading,
58
- communities,
59
- communitiesLoading,
60
- communityStats,
61
- selectChallengeDetailsTab,
62
- setChallengeListingFilter,
63
- showChallengeFilter,
55
+ // challengeFilter,
56
+ // challenges,
57
+ // challengesLoading,
58
+ // communities,
59
+ // communitiesLoading,
60
+ // communityStats,
61
+ // selectChallengeDetailsTab,
62
+ // setChallengeListingFilter,
63
+ // showChallengeFilter,
64
64
srms,
65
65
srmsLoading,
66
- switchChallengeFilter,
67
- switchShowChallengeFilter,
66
+ // switchChallengeFilter,
67
+ // switchShowChallengeFilter,
68
68
switchTab,
69
69
tab,
70
- unregisterFromChallenge,
71
- userGroups,
72
- userResources,
73
- challengeTypesMap,
70
+ // unregisterFromChallenge,
71
+ // userGroups,
72
+ // userResources,
73
+ // challengeTypesMap,
74
74
} = this . props ;
75
75
76
+ /* Hide My Communities community-app#5288
76
77
const myCommunities = communities.filter(x => _.intersection(userGroups, x.groupIds).length)
77
78
.map((community) => {
78
79
const filter = Filter.getFilterFunction(community.challengeFilter);
79
80
const res = _.clone(community);
80
81
res.number = challenges.filter(x => filter(x)).length;
81
82
return res;
82
83
});
84
+ */
83
85
84
86
return (
85
87
< div styleName = "container" >
86
88
< Header
87
- numChallenges = { challenges . length }
88
- numCommunities = { myCommunities . length }
89
+ // numChallenges={challenges.length}
90
+ // numCommunities={myCommunities.length}
89
91
switchTab = { switchTab }
90
92
tab = { tab }
91
93
/>
92
- {
94
+ { /*
93
95
tab === TABS.MY_ACTIVE_CHALLENGES ? (
94
96
<Challenges
95
97
challengeFilter={challengeFilter}
@@ -111,16 +113,16 @@ export default class MyChallenges extends React.Component {
111
113
challengeTypesMap={challengeTypesMap}
112
114
/>
113
115
) : null
114
- }
115
- {
116
+ */ }
117
+ { /* Hide My Communities community-app#5288
116
118
tab === TABS.COMMUNITIES ? (
117
119
<Communities
118
120
communities={myCommunities}
119
121
communitiesLoading={communitiesLoading}
120
122
communityStats={communityStats}
121
123
/>
122
124
) : null
123
- }
125
+ */ }
124
126
{
125
127
tab === TABS . SRMS ? (
126
128
< Srms
@@ -135,28 +137,28 @@ export default class MyChallenges extends React.Component {
135
137
}
136
138
137
139
MyChallenges . defaultProps = {
138
- challenges : [ ] ,
139
- userResources : [ ] ,
140
+ // challenges: [],
141
+ // userResources: [],
140
142
} ;
141
143
142
144
MyChallenges . propTypes = {
143
- challengeFilter : PT . string . isRequired ,
144
- challenges : PT . arrayOf ( PT . object ) ,
145
- challengesLoading : PT . bool . isRequired ,
146
- communities : PT . arrayOf ( PT . object ) . isRequired ,
147
- communitiesLoading : PT . bool . isRequired ,
148
- communityStats : PT . shape ( ) . isRequired ,
149
- selectChallengeDetailsTab : PT . func . isRequired ,
150
- setChallengeListingFilter : PT . func . isRequired ,
151
- showChallengeFilter : PT . bool . isRequired ,
145
+ // challengeFilter: PT.string.isRequired,
146
+ // challenges: PT.arrayOf(PT.object),
147
+ // challengesLoading: PT.bool.isRequired,
148
+ // communities: PT.arrayOf(PT.object).isRequired,
149
+ // communitiesLoading: PT.bool.isRequired,
150
+ // communityStats: PT.shape().isRequired,
151
+ // selectChallengeDetailsTab: PT.func.isRequired,
152
+ // setChallengeListingFilter: PT.func.isRequired,
153
+ // showChallengeFilter: PT.bool.isRequired,
152
154
srms : PT . arrayOf ( PT . object ) . isRequired ,
153
155
srmsLoading : PT . bool . isRequired ,
154
- switchChallengeFilter : PT . func . isRequired ,
155
- switchShowChallengeFilter : PT . func . isRequired ,
156
+ // switchChallengeFilter: PT.func.isRequired,
157
+ // switchShowChallengeFilter: PT.func.isRequired,
156
158
switchTab : PT . func . isRequired ,
157
159
tab : PT . oneOf ( _ . values ( TABS ) ) . isRequired ,
158
- unregisterFromChallenge : PT . func . isRequired ,
159
- userGroups : PT . arrayOf ( PT . string ) . isRequired ,
160
- userResources : PT . arrayOf ( PT . shape ( ) ) ,
161
- challengeTypesMap : PT . shape ( ) . isRequired ,
160
+ // unregisterFromChallenge: PT.func.isRequired,
161
+ // userGroups: PT.arrayOf(PT.string).isRequired,
162
+ // userResources: PT.arrayOf(PT.shape()),
163
+ // challengeTypesMap: PT.shape().isRequired,
162
164
} ;
0 commit comments