Skip to content

Commit 6729ff7

Browse files
authored
Merge pull request #1184 from Gauravseta/issue-1165
issue 1165 fix
2 parents 86c6e69 + e9cd87e commit 6729ff7

File tree

1 file changed

+11
-25
lines changed
  • src/components/ChallengesComponent

1 file changed

+11
-25
lines changed

src/components/ChallengesComponent/index.js

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import PropTypes from 'prop-types'
66
import Sticky from 'react-stickynode'
77
import { Helmet } from 'react-helmet'
88
import { Link } from 'react-router-dom'
9-
import { CONNECT_APP_URL, DIRECT_PROJECT_URL } from '../../config/constants'
10-
9+
import { CONNECT_APP_URL } from '../../config/constants'
1110
import { PrimaryButton } from '../Buttons'
1211
import ChallengeList from './ChallengeList'
1312
import styles from './ChallengesComponent.module.scss'
@@ -36,31 +35,18 @@ const ChallengesComponent = ({
3635
<Helmet title={activeProject ? activeProject.name : ''} />
3736
<div className={styles.titleContainer}>
3837
<div className={styles.titleLinks}>
39-
{activeProject && activeProject.id && (
40-
<a
41-
className={styles.buttonLaunchNew}
42-
href={`${CONNECT_APP_URL}/projects/${activeProject.id}`}
43-
target={'_blank'}
44-
>
45-
<PrimaryButton text={'View Project in Connect'} type={'info'} />
46-
</a>
47-
)}
48-
{activeProject && activeProject.directProjectId && (
49-
<a
50-
className={styles.buttonLaunchNew}
51-
href={`${DIRECT_PROJECT_URL}/projectOverview?formData.projectId=${activeProject.directProjectId}`}
52-
target={'_blank'}
53-
>
54-
<PrimaryButton text={'View Project in Direct'} type={'info'} />
55-
</a>
38+
<div
39+
className={styles.title}
40+
dangerouslySetInnerHTML={{
41+
__html: xss(activeProject ? activeProject.name : '')
42+
}}
43+
/>
44+
{ activeProject && activeProject.id && (
45+
<span>
46+
(<a href={`${CONNECT_APP_URL}/projects/${activeProject.id}`} target='_blank' rel='noopener noreferrer'>View Project</a>)
47+
</span>
5648
)}
5749
</div>
58-
<div
59-
className={styles.title}
60-
dangerouslySetInnerHTML={{
61-
__html: xss(activeProject ? activeProject.name : '')
62-
}}
63-
/>
6450
{(activeProject && activeProject.id) ? (
6551
<Link
6652
className={styles.buttonLaunchNew}

0 commit comments

Comments
 (0)