File tree 2 files changed +11
-18
lines changed
__tests__/shared/components/ChallengeTile/__snapshots__
src/shared/components/ChallengeTile
2 files changed +11
-18
lines changed Original file line number Diff line number Diff line change @@ -202,12 +202,15 @@ exports[`renders marathon 1`] = `
202
202
className = " src-shared-components-ChallengeTile-___style__completed-challenge___3w5tT"
203
203
>
204
204
<header >
205
- <a
205
+ <Link
206
206
className = " src-shared-components-ChallengeTile-___style__name___1jF7j"
207
- href = " https://community.topcoder.com/longcontest/stats/?module=ViewOverview& rd=17153"
207
+ replace = { false }
208
+ to = " /challenges/15404"
208
209
>
209
- 2018 TCO Marathon
210
- </a >
210
+ <span >
211
+ 2018 TCO Marathon
212
+ </span >
213
+ </Link >
211
214
<p
212
215
className = " src-shared-components-ChallengeTile-___style__subtrack-color___2AJaw"
213
216
>
Original file line number Diff line number Diff line change 2
2
* Challenge tile.
3
3
*/
4
4
/* eslint-env browser */
5
- import _ from 'lodash' ;
6
5
import React from 'react' ;
7
6
import PT from 'prop-types' ;
8
7
import { Link } from 'react-router-dom' ;
@@ -83,36 +82,27 @@ class ChallengeTile extends React.Component {
83
82
margin : '10px 5px' ,
84
83
} ;
85
84
86
- const isDataScience = track === COMPETITION_TRACKS . DATA_SCIENCE ;
87
85
const isDevelopment = track === COMPETITION_TRACKS . DEVELOP ;
88
86
const isDesign = track === COMPETITION_TRACKS . DESIGN ;
89
87
90
- const roundId = isDataScience ? _ . get ( challenge , 'rounds.0.id' ) : 0 ;
91
-
92
88
return (
93
89
< div styleName = "challenge tile" style = { extraStyle } >
94
90
< div styleName = { outStyleName } >
95
91
< div styleName = "completed-challenge" >
96
92
< header >
97
- { ! isDataScience && ( ! challenge . isPrivate
93
+ { ! challenge . isPrivate
98
94
? (
99
95
< Link to = { `/challenges/${ challenge . id } ` } styleName = "name" >
100
96
< span >
101
97
{ challenge . name }
102
98
</ span >
103
99
</ Link >
104
- ) : (
100
+ )
101
+ : (
105
102
< span >
106
103
{ challenge . name }
107
104
</ span >
108
- ) ) }
109
-
110
- { isDataScience
111
- && (
112
- < a styleName = "name" href = { `https://community.topcoder.com/longcontest/stats/?module=ViewOverview&rd=${ roundId } ` } >
113
- { challenge . name }
114
- </ a >
115
- ) }
105
+ ) }
116
106
117
107
< p styleName = "subtrack-color" >
118
108
{ underscoreReplace ( type ) }
You can’t perform that action at this time.
0 commit comments