@@ -133,8 +133,8 @@ export class ListingContainer extends React.Component {
133133 dropPastChallenges,
134134 getPastChallenges,
135135 filterState,
136- loading,
137136 } = this . props ;
137+ const { needLoad } = this . state ;
138138 const oldUserId = _ . get ( prevProps , 'auth.user.userId' ) ;
139139 const userId = _ . get ( this . props , 'auth.user.userId' ) ;
140140 const handle = _ . get ( auth , 'user.handle' ) ;
@@ -259,7 +259,7 @@ export class ListingContainer extends React.Component {
259259 }
260260 if ( filterChanged ( filter , prevProps . filter ) ) {
261261 this . reloadChallenges ( ) ;
262- if ( ! loading ) {
262+ if ( needLoad ) {
263263 // eslint-disable-next-line react/no-did-update-set-state
264264 this . setState ( { needLoad : false } ) ;
265265 }
@@ -714,7 +714,6 @@ ListingContainer.defaultProps = {
714714 queryBucket : BUCKETS . OPEN_FOR_REGISTRATION ,
715715 meta : { } ,
716716 expanding : false ,
717- loading : false ,
718717 // isBucketSwitching: false,
719718 // userChallenges: [],
720719} ;
@@ -814,7 +813,6 @@ ListingContainer.propTypes = {
814813 // getUserChallenges: PT.func.isRequired,
815814 setSearchText : PT . func . isRequired ,
816815 filterState : PT . shape ( ) . isRequired ,
817- loading : PT . bool ,
818816} ;
819817
820818const mapStateToProps = ( state , ownProps ) => {
@@ -875,10 +873,6 @@ const mapStateToProps = (state, ownProps) => {
875873 meta : cl . meta ,
876874 // userChallenges: cl.userChallenges,
877875 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 ,
882876 } ;
883877} ;
884878
0 commit comments