Skip to content

Milestone 20200910 -> 20200917 #4905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Sep 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
"tc-accounts": "git+https://github.com/appirio-tech/accounts-app.git#dev",
"tc-core-library-js": "github:appirio-tech/tc-core-library-js#v2.6.3",
"tc-ui": "^1.0.12",
"topcoder-react-lib": "1.0.4",
"topcoder-react-lib": "1000.22.5",
"topcoder-react-ui-kit": "2.0.0",
"topcoder-react-utils": "0.7.8",
"turndown": "^4.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class SubTrackChallengeView extends React.Component {
this.state = {
// this is current page number. starts with 0.
// everytime we scroll at the bottom, we query from offset = pageNum * CHALLENGE_PER_PAGE
pageNum: 0,
pageNum: 1,
// which challenge's modal should be poped. null means no modal
challengeIndexToPopModal: null,
};
Expand All @@ -140,6 +140,10 @@ class SubTrackChallengeView extends React.Component {
userId,
} = this.props;

const {
pageNum,
} = this.state;

if (track === 'DEVELOP' || track === 'DESIGN') {
if (!loadingSubTrackChallengesUUID) {
loadSubtrackChallenges(
Expand All @@ -159,7 +163,7 @@ class SubTrackChallengeView extends React.Component {
}
} else if (subTrack === 'MARATHON_MATCH') {
if (!loadingMarathonUUID) {
loadMarathon(handle, auth.tokenV3, 0, CHALLENGE_PER_PAGE, true);
loadMarathon(handle, userId, auth.tokenV3, pageNum, CHALLENGE_PER_PAGE, true);
}
}
}
Expand Down Expand Up @@ -209,7 +213,7 @@ class SubTrackChallengeView extends React.Component {
}
} else if (subTrack === 'MARATHON_MATCH') {
if (!loadingMarathonUUID) {
loadMarathon(handle, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false);
loadMarathon(handle, userId, auth.tokenV3, pageNum + 1, CHALLENGE_PER_PAGE, false);
this.setState({ pageNum: pageNum + 1 });
}
}
Expand Down Expand Up @@ -347,7 +351,6 @@ class SubTrackChallengeView extends React.Component {
userMarathons,
item => ({
...item,
submissionEndDate: _.get(item, 'rounds.0.systemTestEndAt'),
pointTotal: _.get(item, 'rounds.0.userMMDetails.pointTotal'),
}),
);
Expand Down Expand Up @@ -440,10 +443,18 @@ function mapDispatchToProps(dispatch) {
dispatch(action.getUserSrmInit(handle, uuid));
dispatch(action.getUserSrmDone(uuid, handle, tokenV3, pageNum, pageSize, refresh));
},
loadMarathon: (handle, tokenV3, pageNum, pageSize, refresh) => {
loadMarathon: (handle, memberId, tokenV3, pageNum, pageSize, refresh) => {
const uuid = shortId();
dispatch(action.getUserMarathonInit(handle, uuid));
dispatch(action.getUserMarathonDone(uuid, handle, tokenV3, pageNum, pageSize, refresh));
dispatch(action.getUserMarathonDone(
uuid,
handle,
memberId,
tokenV3,
pageNum,
pageSize,
refresh,
));
},
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import './style.scss';

const Filter = challengeUtils.filter;

const RSS_LINK = 'http://feeds.topcoder.com/challenges/feed?list=active&contestType=all';
// DISABLED: Until feeds.topcoder.com domain fixed community-app#4606
// const RSS_LINK = 'http://feeds.topcoder.com/challenges/feed?list=active&contestType=all';

export default function BucketSelector({
activeBucket,
Expand Down Expand Up @@ -109,11 +110,14 @@ export default function BucketSelector({
) : ''
}
<hr />
{/* DISABLED: Until feeds.topcoder.com domain fixed community-app#4606 */}
{/*
<div styleName="get-rss">
<a href={RSS_LINK}>
Get the RSS feed
</a>
</div>
*/}
</div>
);
}
Expand Down