diff --git a/src/shared/containers/SubmissionPage.jsx b/src/shared/containers/SubmissionPage.jsx index bc017f3e83..0e63928042 100644 --- a/src/shared/containers/SubmissionPage.jsx +++ b/src/shared/containers/SubmissionPage.jsx @@ -6,7 +6,6 @@ * Connects the Redux store to the Challenge Submissions display components. * Passes the relevent state and setters as properties to the UI components. */ -import _ from 'lodash'; import actions from 'actions/page/submission'; import communityActions from 'actions/tc-communities'; import shortId from 'shortid'; @@ -15,7 +14,6 @@ import PT from 'prop-types'; import { connect } from 'react-redux'; import SubmissionsPage from 'components/SubmissionPage'; import AccessDenied, { CAUSE as ACCESS_DENIED_REASON } from 'components/tc-communities/AccessDenied'; -import { USER_GROUP_MAXAGE } from 'config'; /** * SubmissionsPage Container @@ -29,18 +27,10 @@ class SubmissionsPageContainer extends React.Component { componentDidMount() { const { auth, - groups, - communitiesList, getCommunitiesList, } = this.props; - // check if challenge belongs to any groups - // and the communitiesList is not up-to-date - // then will load the communitiesList - if (!_.isEmpty(groups) && !communitiesList.loadingUuid - && (Date.now() - communitiesList.timestamp > USER_GROUP_MAXAGE)) { - getCommunitiesList(auth); - } + getCommunitiesList(auth); } /* A child component has called their submitForm() prop, prepare the passed diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index 32fbc5fc79..335208aa6d 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -31,7 +31,6 @@ import { BUCKETS } from 'utils/challenge-listing/buckets'; import { CHALLENGE_PHASE_TYPES, COMPETITION_TRACKS_V3, SUBTRACKS } from 'utils/tc'; import { config, MetaTags } from 'topcoder-react-utils'; import { actions } from 'topcoder-react-lib'; -import { USER_GROUP_MAXAGE } from 'config'; import ogWireframe from '../../../assets/images/open-graph/challenges/01-wireframe.jpg'; @@ -127,7 +126,6 @@ class ChallengeDetailPageContainer extends React.Component { const { auth, challenge, - communitiesList, getCommunitiesList, loadChallengeDetails, challengeId, @@ -161,10 +159,7 @@ class ChallengeDetailPageContainer extends React.Component { loadChallengeDetails(auth, challengeId); } - if (!communitiesList.loadingUuid - && (Date.now() - communitiesList.timestamp > USER_GROUP_MAXAGE)) { - getCommunitiesList(auth); - } + getCommunitiesList(auth); if (_.isEmpty(challengeSubtracksMap)) { getSubtracks();