Skip to content

Commit 0688f8f

Browse files
authored
Merge pull request #241 from Colinh84/issue_166
Issue 166: Changed <a> header and challenge listing tags to <Link> Fixes #166
2 parents d985577 + b41bbc5 commit 0688f8f

File tree

2 files changed

+8
-7
lines changed
  • src/shared/components

2 files changed

+8
-7
lines changed

src/shared/components/TopcoderHeader/desktop/SubMenu/Item/index.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import PT from 'prop-types';
66
import React from 'react';
7-
7+
import { Link } from 'utils/router';
88
import './style.scss';
99

1010
export default function Item({
@@ -17,10 +17,10 @@ export default function Item({
1717
if (currentSubMenuTitle === title) styleName += ' current';
1818
return (
1919
<li styleName={styleName}>
20-
<a href={link}>
20+
<Link to={link}>
2121
{icon}
2222
{title}
23-
</a>
23+
</Link>
2424
</li>
2525
);
2626
}

src/shared/components/challenge-listing/ChallengeCard/index.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import _ from 'lodash';
22
import config from 'utils/config';
3+
import { Link } from 'utils/router';
34
import moment from 'moment';
45
import React from 'react';
56
import PT from 'prop-types';
@@ -124,11 +125,11 @@ function ChallengeCard({
124125
</div>
125126

126127
<div styleName={isRegistrationOpen ? 'challenge-details with-register-button' : 'challenge-details'}>
127-
<a
128-
href={challengeDetailLink}
128+
<Link
129+
to={challengeDetailLink}
129130
styleName="challenge-title"
130-
target={openChallengesInNewTabs ? '_blank' : undefined}
131-
>{challenge.name}</a>
131+
openNewTab={openChallengesInNewTabs}
132+
>{challenge.name}</Link>
132133
<div styleName="details-footer">
133134
<span styleName="date">
134135
{challenge.status === 'ACTIVE' ? 'Ends ' : 'Ended '}

0 commit comments

Comments
 (0)