Skip to content

Commit 8bce48b

Browse files
committed
Merge pull request #6568 from topcoder-platform/f2f-30277179-4
Topcoder Reskin - Challenge Icons Colors
1 parent 8c06ddf commit 8bce48b

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

__tests__/shared/components/TrackIcon/__snapshots__/index.jsx.snap

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ exports[`Matches shallow shapshot 1`] = `
55
className="src-shared-components-TrackIcon-___style__trackIcon___3gJ9l"
66
>
77
<div
8-
className="src-shared-components-TrackIcon-___style__development___1LZdf src-shared-components-TrackIcon-___style__main-icon___1q-1_"
8+
className="src-shared-components-TrackIcon-___style__CH___3YWAb src-shared-components-TrackIcon-___style__main-icon___1q-1_"
99
>
1010
CH
1111
</div>
1212
<a
1313
href="https://www.topcoder-dev.com/tco"
1414
>
1515
<div
16-
className="src-shared-components-TrackIcon-___style__hidden___JXTEt"
16+
className="src-shared-components-TrackIcon-___style__CH___3YWAb src-shared-components-TrackIcon-___style__tco-icon___18ZV7 src-shared-components-TrackIcon-___style__hidden___JXTEt"
1717
>
1818
TCO
1919
</div>
@@ -26,15 +26,15 @@ exports[`Matches shallow shapshot 2`] = `
2626
className="src-shared-components-TrackIcon-___style__trackIcon___3gJ9l"
2727
>
2828
<div
29-
className="src-shared-components-TrackIcon-___style__development___1LZdf src-shared-components-TrackIcon-___style__main-icon___1q-1_"
29+
className="src-shared-components-TrackIcon-___style__CH___3YWAb src-shared-components-TrackIcon-___style__main-icon___1q-1_"
3030
>
3131
CH
3232
</div>
3333
<a
3434
href="https://www.topcoder-dev.com/tco"
3535
>
3636
<div
37-
className="src-shared-components-TrackIcon-___style__development___1LZdf src-shared-components-TrackIcon-___style__tco-icon___18ZV7"
37+
className="src-shared-components-TrackIcon-___style__CH___3YWAb src-shared-components-TrackIcon-___style__tco-icon___18ZV7"
3838
>
3939
TCO
4040
</div>
@@ -47,15 +47,15 @@ exports[`Matches shallow shapshot 3`] = `
4747
className="src-shared-components-TrackIcon-___style__trackIcon___3gJ9l"
4848
>
4949
<div
50-
className="src-shared-components-TrackIcon-___style__development___1LZdf src-shared-components-TrackIcon-___style__main-icon___1q-1_"
50+
className="src-shared-components-TrackIcon-___style__CH___3YWAb src-shared-components-TrackIcon-___style__main-icon___1q-1_"
5151
>
5252
CH
5353
</div>
5454
<a
5555
href="https://www.topcoder-dev.com/tco"
5656
>
5757
<div
58-
className="src-shared-components-TrackIcon-___style__development___1LZdf src-shared-components-TrackIcon-___style__tco-icon___18ZV7"
58+
className="src-shared-components-TrackIcon-___style__CH___3YWAb src-shared-components-TrackIcon-___style__tco-icon___18ZV7"
5959
>
6060
TCO
6161
</div>

src/shared/components/TrackIcon/index.jsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export default function TrackIcon({
1414
}) {
1515
const TCO_URL = `${MAIN_URL}/tco`;
1616
const trackStyle = track.replace(' ', '-').toLowerCase();
17+
let abbreviationStyle = type.abbreviation;
18+
if (['CH', 'F2F', 'TSK'].indexOf(abbreviationStyle) < 0) {
19+
abbreviationStyle = '';
20+
}
1721
return (
1822
<span styleName="trackIcon">
1923
{challengesUrl ? (
@@ -26,13 +30,13 @@ export default function TrackIcon({
2630
</a>
2731
) : (
2832
<div
29-
styleName={`${type.abbreviation} main-icon`}
33+
styleName={`${abbreviationStyle} main-icon`}
3034
>
3135
{type.abbreviation}
3236
</div>
3337
)}
3438
<a href={`${TCO_URL}`}>
35-
<div styleName={`${type.abbreviation} tco-icon ${tcoEligible ? '' : 'hidden'}`}>
39+
<div styleName={`${abbreviationStyle} tco-icon ${tcoEligible ? '' : 'hidden'}`}>
3640
TCO
3741
</div>
3842
</a>

0 commit comments

Comments
 (0)