44/* eslint jsx-a11y/no-static-element-interactions:0 */
55
66import _ from 'lodash' ;
7+ import config from 'utils/config' ;
78import moment from 'moment' ;
89import React from 'react' ;
910import PT from 'prop-types' ;
@@ -26,7 +27,7 @@ const numberWithCommas = n => (n ? n.toString().replace(/\B(?=(\d{3})+(?!\d))/g,
2627
2728function ChallengeCard ( {
2829 challenge : passedInChallenge ,
29- config,
30+ config : configFromProps ,
3031 sampleWinnerProfile,
3132 onTechTagClicked,
3233} ) {
@@ -40,8 +41,8 @@ function ChallengeCard({
4041 // challenge.totalPrize = challenge.prize.reduce((x, y) => y + x, 0)
4142
4243 const challengeDetailLink = ( ) => {
43- const challengeUrl = `${ config . MAIN_URL } /challenge-details/` ;
44- const mmDetailUrl = `${ window . location . protocol } ${ config . COMMUNITY_URL } /tc?module=MatchDetails&rd=` ; // Marathon Match details
44+ const challengeUrl = `${ config . URL . BASE } /challenge-details/` ;
45+ const mmDetailUrl = `${ config . URL . COMMUNITY } /tc?module=MatchDetails&rd=` ; // Marathon Match details
4546 if ( challenge . track === 'DATA_SCIENCE' ) {
4647 const id = `${ challenge . id } ` ;
4748 if ( id . length < ID_LENGTH ) {
@@ -86,7 +87,7 @@ function ChallengeCard({
8687 </ div >
8788 < div styleName = "right-panel" >
8889 < div styleName = { isRegistrationOpen ? 'prizes with-register-button' : 'prizes' } >
89- < PrizesTooltip challenge = { challenge } config = { config } >
90+ < PrizesTooltip challenge = { challenge } config = { configFromProps } >
9091 < div >
9192 < div > < span styleName = "dollar" > $</ span > { numberWithCommas ( challenge . totalPrize ) } </ div >
9293 < div styleName = "label" > Purse</ div >
@@ -96,7 +97,7 @@ function ChallengeCard({
9697
9798 < ChallengeStatus
9899 challenge = { challenge }
99- config = { config }
100+ config = { configFromProps }
100101 detailLink = { challengeDetailLink ( challenge ) }
101102 sampleWinnerProfile = { sampleWinnerProfile }
102103 />
0 commit comments