From 18f185a1391c152fc4465c3c61f65339ad2fa368 Mon Sep 17 00:00:00 2001 From: gauravseta Date: Thu, 7 Feb 2019 21:07:49 +0530 Subject: [PATCH 1/3] issue 1936 fix --- src/shared/containers/SubmissionPage.jsx | 6 ------ src/shared/containers/challenge-detail/index.jsx | 3 --- 2 files changed, 9 deletions(-) diff --git a/src/shared/containers/SubmissionPage.jsx b/src/shared/containers/SubmissionPage.jsx index bc017f3e83..f33e5968dc 100644 --- a/src/shared/containers/SubmissionPage.jsx +++ b/src/shared/containers/SubmissionPage.jsx @@ -34,13 +34,7 @@ class SubmissionsPageContainer extends React.Component { 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); - } } /* 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..ff236dd6ef 100644 --- a/src/shared/containers/challenge-detail/index.jsx +++ b/src/shared/containers/challenge-detail/index.jsx @@ -161,10 +161,7 @@ class ChallengeDetailPageContainer extends React.Component { loadChallengeDetails(auth, challengeId); } - if (!communitiesList.loadingUuid - && (Date.now() - communitiesList.timestamp > USER_GROUP_MAXAGE)) { getCommunitiesList(auth); - } if (_.isEmpty(challengeSubtracksMap)) { getSubtracks(); From d710a0d7b1152260f1ae783cfb5ebc0e9ca08ba3 Mon Sep 17 00:00:00 2001 From: Gaurav Seta Date: Fri, 8 Feb 2019 00:44:52 +0530 Subject: [PATCH 2/3] Update SubmissionPage.jsx --- src/shared/containers/SubmissionPage.jsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/shared/containers/SubmissionPage.jsx b/src/shared/containers/SubmissionPage.jsx index f33e5968dc..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,12 +27,10 @@ class SubmissionsPageContainer extends React.Component { componentDidMount() { const { auth, - groups, - communitiesList, getCommunitiesList, } = this.props; - getCommunitiesList(auth); + getCommunitiesList(auth); } /* A child component has called their submitForm() prop, prepare the passed From 50c17fce3a2bfa5d65b733bf2ff20267428ac35d Mon Sep 17 00:00:00 2001 From: Gaurav Seta Date: Fri, 8 Feb 2019 00:52:16 +0530 Subject: [PATCH 3/3] Update index.jsx --- src/shared/containers/challenge-detail/index.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/shared/containers/challenge-detail/index.jsx b/src/shared/containers/challenge-detail/index.jsx index ff236dd6ef..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,7 +159,7 @@ class ChallengeDetailPageContainer extends React.Component { loadChallengeDetails(auth, challengeId); } - getCommunitiesList(auth); + getCommunitiesList(auth); if (_.isEmpty(challengeSubtracksMap)) { getSubtracks();