Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,15 @@
padding: 0 20px;
}

.titleLinks {
align-items: center;
display: flex;

> a + a {
margin-left: 20px;
}
}

.buttonLaunchNew {
min-width: 135px;
height: 40px;
Expand Down
33 changes: 21 additions & 12 deletions src/components/ChallengesComponent/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PropTypes from 'prop-types'
import Sticky from 'react-stickynode'
import { Helmet } from 'react-helmet'
import { Link } from 'react-router-dom'
import { CONNECT_APP_URL } from '../../config/constants'
import { CONNECT_APP_URL, DIRECT_PROJECT_URL } from '../../config/constants'

import { PrimaryButton } from '../Buttons'
import ChallengeList from './ChallengeList'
Expand All @@ -32,17 +32,26 @@ const ChallengesComponent = ({
<div>
<Helmet title={activeProject ? activeProject.name : ''} />
<div className={styles.titleContainer}>
{(activeProject && activeProject.id) ? (
<a
className={styles.buttonLaunchNew}
href={`${CONNECT_APP_URL}/projects/${activeProject.id}`}
target={'_blank'}
>
<PrimaryButton text={'View Project in Connect'} type={'info'} />
</a>
) : (
<span />
)}
<div className={styles.titleLinks}>
{activeProject && activeProject.id && (
<a
className={styles.buttonLaunchNew}
href={`${CONNECT_APP_URL}/projects/${activeProject.id}`}
target={'_blank'}
>
<PrimaryButton text={'View Project in Connect'} type={'info'} />
</a>
)}
{activeProject && activeProject.directProjectId && (
<a
className={styles.buttonLaunchNew}
href={`${DIRECT_PROJECT_URL}/projectOverview?formData.projectId=${activeProject.directProjectId}`}
target={'_blank'}
>
<PrimaryButton text={'View Project in Direct'} type={'info'} />
</a>
)}
</div>
<div
className={styles.title}
dangerouslySetInnerHTML={{
Expand Down