@@ -24,11 +24,10 @@ class ProfileStatsContainer extends React.Component {
24
24
loadStats,
25
25
loadStatsHistoryAndDistribution,
26
26
meta,
27
- userId,
28
27
} = this . props ;
29
28
30
29
const trackAndSubTrack = getQueryParamsQuery ( location ) ;
31
- loadStats ( handleParam , _ . join ( _ . get ( meta , 'groupIds' , [ ] ) ) , userId ) ;
30
+ loadStats ( handleParam , _ . join ( _ . get ( meta , 'groupIds' , [ ] ) ) ) ;
32
31
if ( shouldShowGraph ( trackAndSubTrack ) ) {
33
32
loadStatsHistoryAndDistribution (
34
33
handleParam ,
@@ -50,14 +49,13 @@ class ProfileStatsContainer extends React.Component {
50
49
const {
51
50
handleParam,
52
51
location,
53
- userId,
54
52
} = this . props ;
55
53
56
54
const nextQueryParams = getQueryParamsQuery ( nextLocation ) ;
57
55
const trackAndSubTrack = getQueryParamsQuery ( location ) ;
58
56
59
57
if ( nextHandleParam !== handleParam ) {
60
- loadStats ( nextHandleParam , _ . join ( _ . get ( meta , 'groupIds' , [ ] ) ) , userId ) ;
58
+ loadStats ( nextHandleParam , _ . join ( _ . get ( meta , 'groupIds' , [ ] ) ) ) ;
61
59
if (
62
60
nextQueryParams . track !== trackAndSubTrack . track
63
61
|| nextQueryParams . subTrack !== trackAndSubTrack . subTrack
@@ -116,7 +114,6 @@ ProfileStatsContainer.propTypes = {
116
114
loadStats : PT . func . isRequired ,
117
115
loadStatsHistoryAndDistribution : PT . func . isRequired ,
118
116
handleParam : PT . string . isRequired ,
119
- userId : PT . number . isRequired ,
120
117
statsHistory : PT . arrayOf ( PT . shape ( ) ) ,
121
118
statsDistribution : PT . shape ( ) ,
122
119
stats : PT . arrayOf ( PT . shape ( ) ) ,
@@ -129,7 +126,6 @@ ProfileStatsContainer.propTypes = {
129
126
const mapStateToProps = ( state , ownProps ) => {
130
127
const handleParam = ownProps . match . params . handle ;
131
128
const obj = _ . get ( state . members , handleParam , { } ) ;
132
- const userId = _ . get ( state . profile . info , 'userId' ) ;
133
129
return ( {
134
130
handleParam,
135
131
loadingError : state . members . loadingError ,
@@ -144,7 +140,6 @@ const mapStateToProps = (state, ownProps) => {
144
140
info : state . profile . info ,
145
141
meta : ownProps . meta ,
146
142
achievements : state . profile . achievements ,
147
- userId,
148
143
} ) ;
149
144
} ;
150
145
@@ -153,13 +148,13 @@ function mapDispatchToProps(dispatch) {
153
148
const pa = actions . profile ;
154
149
155
150
return {
156
- loadStats : ( handle , groupIds , userId ) => {
151
+ loadStats : ( handle , groupIds ) => {
157
152
dispatch ( a . getStatsInit ( handle ) ) ;
158
153
dispatch ( a . getStatsDone ( handle , groupIds ) ) ;
159
154
dispatch ( pa . getInfoInit ( handle ) ) ;
160
155
dispatch ( pa . getInfoDone ( handle ) ) ;
161
- dispatch ( a . getActiveChallengesInit ( userId ) ) ;
162
- dispatch ( a . getActiveChallengesDone ( userId ) ) ;
156
+ dispatch ( a . getActiveChallengesInit ( handle ) ) ;
157
+ dispatch ( a . getActiveChallengesDone ( handle ) ) ;
163
158
} ,
164
159
loadStatsHistoryAndDistribution : ( handle , groupIds , track , subTrack ) => {
165
160
dispatch ( a . getStatsHistoryInit ( handle ) ) ;
0 commit comments