Skip to content

Commit 75ed29f

Browse files
committed
1 parent d236274 commit 75ed29f

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

src/shared/components/challenge-detail/Registrants/index.jsx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ import CheckMark from '../icons/check-mark.svg';
1515
import ArrowDown from '../../../../assets/images/arrow-down.svg';
1616
import './style.scss';
1717

18-
const BUG_HUNT = 'Bug Hunt';
19-
const F2F = 'First2Finish';
20-
2118
function formatDate(date) {
2219
if (!date) return '-';
2320
return moment(date).local().format('MMM DD, YYYY HH:mm');
@@ -245,7 +242,6 @@ export default class Registrants extends React.Component {
245242
const {
246243
prizeSets,
247244
legacy,
248-
type,
249245
} = challenge;
250246

251247
const { track } = legacy;
@@ -254,11 +250,7 @@ export default class Registrants extends React.Component {
254250
const { field, sort } = this.getRegistrantsSortParam();
255251
const revertSort = (sort === 'desc') ? 'asc' : 'desc';
256252
const isDesign = track.toLowerCase() === 'design';
257-
const isF2F = track.indexOf('FIRST_2_FINISH') > -1;
258253

259-
const isBugHunt = track.indexOf('BUG_HUNT') > -1
260-
|| type === BUG_HUNT
261-
|| type === F2F;
262254
const placementPrizes = _.find(prizeSets, { type: 'placement' });
263255
const { prizes } = placementPrizes || [];
264256

@@ -271,7 +263,7 @@ export default class Registrants extends React.Component {
271263
<div styleName={`container ${twoRounds ? 'design' : ''}`} role="table" aria-label="Registrants">
272264
<div styleName="head" role="row">
273265
{
274-
!isDesign && !isF2F && !isBugHunt && (
266+
!isDesign && (
275267
<button
276268
type="button"
277269
onClick={() => {
@@ -401,7 +393,7 @@ export default class Registrants extends React.Component {
401393
return (
402394
<div styleName="row" key={r.memberHandle} role="row">
403395
{
404-
!isDesign && !isF2F && !isBugHunt && (
396+
!isDesign && (
405397
<div styleName="col-2">
406398
<div styleName="sm-only title">
407399
Rating
@@ -421,7 +413,7 @@ export default class Registrants extends React.Component {
421413
<span role="cell">
422414
<a
423415
href={`${window.origin}/members/${r.memberHandle}`}
424-
styleName={`level-${getRatingLevel(_.get(r, 'rating', 0))}`}
416+
styleName={isDesign ? '' : `level-${getRatingLevel(_.get(r, 'rating', 0))}`}
425417
target={`${_.includes(window.origin, 'www') ? '_self' : '_blank'}`}
426418
>
427419
{r.memberHandle}

src/shared/components/challenge-detail/Registrants/style.scss

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,21 +281,21 @@
281281
}
282282

283283
.level-1 {
284-
color: $tc-level-1 !important;
284+
color: $member-gray !important;
285285
}
286286

287287
.level-2 {
288-
color: $tc-level-2 !important;
288+
color: $member-green !important;
289289
}
290290

291291
.level-3 {
292-
color: $tc-level-3 !important;
292+
color: $member-blue !important;
293293
}
294294

295295
.level-4 {
296-
color: $tc-level-4 !important;
296+
color: $member-yellow !important;
297297
}
298298

299299
.level-5 {
300-
color: $tc-level-5 !important;
300+
color: $member-red !important;
301301
}

src/styles/_mixins/_variables.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@ $tco-black: #2a2a2a;
33

44
/* @media */
55
$screen-sm: 768px;
6+
7+
/* member rating colors */
8+
$member-gray: #555555;
9+
$member-green: #258205;
10+
$member-blue: #4c50d9;
11+
$member-yellow: #F2C900;
12+
$member-red: #ea1900;

0 commit comments

Comments
 (0)