File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
components/challenge-detail/Submissions Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 66import React from 'react' ;
77import PT from 'prop-types' ;
88import moment from 'moment' ;
9- import { isMM as checkIsMM } from 'utils/challenge' ;
9+ import { isMM as checkIsMM , isMMByType as checkIsMMByType } from 'utils/challenge' ;
1010import _ from 'lodash' ;
1111import { connect } from 'react-redux' ;
1212import { config } from 'topcoder-react-utils' ;
@@ -604,7 +604,7 @@ class SubmissionsComponent extends React.Component {
604604 }
605605 {
606606 ( ( numWinners > 0 || challenge . status === CHALLENGE_STATUS . COMPLETED )
607- && isMM && isLoggedIn ) && (
607+ && isMMByType ( challenge ) && isLoggedIn ) && (
608608 < div styleName = "block-download-all" >
609609 < button
610610 disabled = { downloadingAll }
Original file line number Diff line number Diff line change @@ -13,6 +13,14 @@ export function isMM(challenge) {
1313 return tags . includes ( 'Marathon Match' ) || isMMType ;
1414}
1515
16+ /**
17+ * check if is marathon match challenge by type only (ignore MM tags)
18+ * @param {Object } challenge challenge object
19+ */
20+ export function isMMByType ( challenge ) {
21+ const isMMType = challenge ? challenge . type === 'Marathon Match' : false ;
22+ return isMMType ;
23+ }
1624/**
1725 * Set challenge type to challenge
1826 * @param {Object } challenges challenge object
@@ -29,5 +37,6 @@ export function updateChallengeType(challenges, challengeTypeMap) {
2937
3038export default {
3139 isMM,
40+ isMMByType,
3241 updateChallengeType,
3342} ;
You can’t perform that action at this time.
0 commit comments