Skip to content

Commit e2e67e8

Browse files
authored
Merge pull request #1945 from Gauravseta/issue_1936
Issue 1936 fixd
2 parents 80c1d75 + 50c17fc commit e2e67e8

File tree

2 files changed

+2
-17
lines changed

2 files changed

+2
-17
lines changed

src/shared/containers/SubmissionPage.jsx

+1-11
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
* Connects the Redux store to the Challenge Submissions display components.
77
* Passes the relevent state and setters as properties to the UI components.
88
*/
9-
import _ from 'lodash';
109
import actions from 'actions/page/submission';
1110
import communityActions from 'actions/tc-communities';
1211
import shortId from 'shortid';
@@ -15,7 +14,6 @@ import PT from 'prop-types';
1514
import { connect } from 'react-redux';
1615
import SubmissionsPage from 'components/SubmissionPage';
1716
import AccessDenied, { CAUSE as ACCESS_DENIED_REASON } from 'components/tc-communities/AccessDenied';
18-
import { USER_GROUP_MAXAGE } from 'config';
1917

2018
/**
2119
* SubmissionsPage Container
@@ -29,18 +27,10 @@ class SubmissionsPageContainer extends React.Component {
2927
componentDidMount() {
3028
const {
3129
auth,
32-
groups,
33-
communitiesList,
3430
getCommunitiesList,
3531
} = this.props;
3632

37-
// check if challenge belongs to any groups
38-
// and the communitiesList is not up-to-date
39-
// then will load the communitiesList
40-
if (!_.isEmpty(groups) && !communitiesList.loadingUuid
41-
&& (Date.now() - communitiesList.timestamp > USER_GROUP_MAXAGE)) {
42-
getCommunitiesList(auth);
43-
}
33+
getCommunitiesList(auth);
4434
}
4535

4636
/* A child component has called their submitForm() prop, prepare the passed

src/shared/containers/challenge-detail/index.jsx

+1-6
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import { BUCKETS } from 'utils/challenge-listing/buckets';
3131
import { CHALLENGE_PHASE_TYPES, COMPETITION_TRACKS_V3, SUBTRACKS } from 'utils/tc';
3232
import { config, MetaTags } from 'topcoder-react-utils';
3333
import { actions } from 'topcoder-react-lib';
34-
import { USER_GROUP_MAXAGE } from 'config';
3534

3635
import ogWireframe from
3736
'../../../assets/images/open-graph/challenges/01-wireframe.jpg';
@@ -127,7 +126,6 @@ class ChallengeDetailPageContainer extends React.Component {
127126
const {
128127
auth,
129128
challenge,
130-
communitiesList,
131129
getCommunitiesList,
132130
loadChallengeDetails,
133131
challengeId,
@@ -161,10 +159,7 @@ class ChallengeDetailPageContainer extends React.Component {
161159
loadChallengeDetails(auth, challengeId);
162160
}
163161

164-
if (!communitiesList.loadingUuid
165-
&& (Date.now() - communitiesList.timestamp > USER_GROUP_MAXAGE)) {
166-
getCommunitiesList(auth);
167-
}
162+
getCommunitiesList(auth);
168163

169164
if (_.isEmpty(challengeSubtracksMap)) {
170165
getSubtracks();

0 commit comments

Comments
 (0)