Skip to content

Commit 7430f7c

Browse files
authored
Merge pull request #4719 from narekcat/issue-4681
fix: for issue #4681, add checkpoint submissions to submission count
2 parents 17f9a6e + ea9b076 commit 7430f7c

File tree

1 file changed

+6
-2
lines changed
  • src/shared/components/challenge-listing/ChallengeCard/NumSubmissions

1 file changed

+6
-2
lines changed

src/shared/components/challenge-listing/ChallengeCard/NumSubmissions/index.jsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@ import './style.scss';
1717

1818
export default function NumSubmissions({
1919
challenge: {
20-
id, numOfSubmissions, legacy,
20+
id,
21+
numOfSubmissions,
22+
numOfCheckpointSubmissions,
23+
legacy,
2124
},
2225
challengesUrl,
2326
newChallengeDetails,
@@ -26,7 +29,7 @@ export default function NumSubmissions({
2629
isLoggedIn,
2730
}) {
2831
let tip;
29-
const numOfSub = numOfSubmissions || 0;
32+
const numOfSub = numOfSubmissions + (numOfCheckpointSubmissions || 0);
3033
switch (numOfSub) {
3134
case 0: tip = 'No submissions'; break;
3235
case 1: tip = '1 total submission'; break;
@@ -74,6 +77,7 @@ NumSubmissions.propTypes = {
7477
challenge: PT.shape({
7578
id: PT.oneOfType([PT.number, PT.string]).isRequired,
7679
numOfSubmissions: PT.number,
80+
numOfCheckpointSubmissions: PT.number,
7781
status: PT.string.isRequired,
7882
legacy: PT.shape({
7983
track: PT.string.isRequired,

0 commit comments

Comments
 (0)