@@ -133,8 +133,8 @@ export class ListingContainer extends React.Component {
133
133
dropPastChallenges,
134
134
getPastChallenges,
135
135
filterState,
136
- loading,
137
136
} = this . props ;
137
+ const { needLoad } = this . state ;
138
138
const oldUserId = _ . get ( prevProps , 'auth.user.userId' ) ;
139
139
const userId = _ . get ( this . props , 'auth.user.userId' ) ;
140
140
const handle = _ . get ( auth , 'user.handle' ) ;
@@ -259,7 +259,7 @@ export class ListingContainer extends React.Component {
259
259
}
260
260
if ( filterChanged ( filter , prevProps . filter ) ) {
261
261
this . reloadChallenges ( ) ;
262
- if ( ! loading ) {
262
+ if ( needLoad ) {
263
263
// eslint-disable-next-line react/no-did-update-set-state
264
264
this . setState ( { needLoad : false } ) ;
265
265
}
@@ -714,7 +714,6 @@ ListingContainer.defaultProps = {
714
714
queryBucket : BUCKETS . OPEN_FOR_REGISTRATION ,
715
715
meta : { } ,
716
716
expanding : false ,
717
- loading : false ,
718
717
// isBucketSwitching: false,
719
718
// userChallenges: [],
720
719
} ;
@@ -814,7 +813,6 @@ ListingContainer.propTypes = {
814
813
// getUserChallenges: PT.func.isRequired,
815
814
setSearchText : PT . func . isRequired ,
816
815
filterState : PT . shape ( ) . isRequired ,
817
- loading : PT . bool ,
818
816
} ;
819
817
820
818
const mapStateToProps = ( state , ownProps ) => {
@@ -875,10 +873,6 @@ const mapStateToProps = (state, ownProps) => {
875
873
meta : cl . meta ,
876
874
// userChallenges: cl.userChallenges,
877
875
filterState : cl . filter ,
878
- loading : Boolean ( cl . loadingActiveChallengesUUID )
879
- || Boolean ( cl . loadingOpenForRegistrationChallengesUUID )
880
- || Boolean ( cl . loadingMyChallengesUUID ) || Boolean ( cl . loadingAllChallengesUUID )
881
- || Boolean ( cl . loadingPastChallengesUUID ) || cl . loadingReviewOpportunitiesUUID ,
882
876
} ;
883
877
} ;
884
878
0 commit comments