Skip to content

Commit db7596b

Browse files
committed
Revert "fix: no challenges found for logged in"
This reverts commit 8ac0de2.
1 parent 8ac0de2 commit db7596b

File tree

2 files changed

+2
-9
lines changed
  • src/shared

2 files changed

+2
-9
lines changed

src/shared/components/challenge-listing/Listing/style.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.challengeCardContainer {
44
border-radius: $corner-radius;
55
width: 76.5%;
6-
margin-left: auto;
76

87
@include xs-to-md {
98
width: 100%;

src/shared/containers/challenge-listing/Listing/index.jsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -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

820818
const 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

Comments
 (0)