Skip to content

Commit 3276c95

Browse files
author
vikasrohit
authored
Merge pull request #1106 from topcoder-platform/revert-1076-update-task-view-n-api
Revert "Pure V5 task"
2 parents 20017db + d199000 commit 3276c95

File tree

3 files changed

+20
-30
lines changed

3 files changed

+20
-30
lines changed

src/components/ChallengeEditor/ChallengeView/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,15 @@ const ChallengeView = ({
8686
return (
8787
<div className={styles.wrapper}>
8888
<Helmet title='View Details' />
89-
{!isTask && (
90-
<div className={cn(styles.actionButtons, styles.button, styles.actionButtonsLeft)}>
91-
<LegacyLinks challenge={challenge} />
92-
</div>
93-
)}
89+
<div className={cn(styles.actionButtons, styles.button, styles.actionButtonsLeft)}>
90+
<LegacyLinks challenge={challenge} />
91+
</div>
9492
<div className={styles.title}>View Details</div>
9593
<div className={cn(styles.actionButtons, styles.button, styles.actionButtonsRight)}>
9694
{
9795
challenge.status === 'Draft' && (
9896
<div className={styles.button}>
99-
{(challenge.legacyId || isTask) ? (
97+
{challenge.legacyId ? (
10098
<PrimaryButton text={'Launch'} type={'info'} onClick={onLaunchChallenge} />
10199
) : (
102100
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>

src/components/ChallengeEditor/index.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,6 @@ class ChallengeEditor extends Component {
856856
groups: []
857857
// prizeSets: this.getDefaultPrizeSets()
858858
}
859-
if (isTask) {
860-
newChallenge.legacy.pureV5Task = true
861-
}
862859
if (projectDetail.terms) {
863860
const currTerms = new Set(newChallenge.terms.map(term => term.id))
864861
newChallenge.terms.push(
@@ -1328,7 +1325,7 @@ class ChallengeEditor extends Component {
13281325
</div>
13291326
{isDraft && (
13301327
<div className={styles.button}>
1331-
{challenge.legacyId || isTask ? (
1328+
{challenge.legacyId ? (
13321329
<PrimaryButton text={'Launch as Active'} type={'info'} onClick={this.toggleLaunch} />
13331330
) : (
13341331
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>

src/components/ChallengesComponent/ChallengeCard/index.js

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => {
104104
const communityAppUrl = `${COMMUNITY_APP_URL}/challenges/${challenge.id}`
105105
const directUrl = `${DIRECT_PROJECT_URL}/contest/detail?projectId=${challenge.legacyId}`
106106
const orUrl = `${ONLINE_REVIEW_URL}/review/actions/ViewProjectDetails?pid=${challenge.legacyId}`
107-
const isTask = _.get(challenge, 'task.isTask', false)
108107

109108
// NEW projects never have Legacy challenge created, so don't show links and "Activate" button for them at all
110109
if (challenge.status.toUpperCase() === CHALLENGE_STATUS.NEW) {
@@ -115,17 +114,15 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => {
115114
)
116115
}
117116

118-
return challenge.legacyId || isTask ? (
117+
return challenge.legacyId ? (
119118
<div className={styles.linkGroup}>
120119
<div className={styles.linkGroupLeft}>
121120
<a className={styles.link} href={communityAppUrl} target='_blank'>View Challenge</a>
122-
{!isTask && (
123-
<div className={styles.linkGroupLeftBottom}>
124-
<a className={styles.link} href={directUrl} target='_blank'>Direct</a>
125-
<span className={styles.linkDivider}>|</span>
126-
<a className={styles.link} href={orUrl} target='_blank'>OR</a>
127-
</div>
128-
)}
121+
<div className={styles.linkGroupLeftBottom}>
122+
<a className={styles.link} href={directUrl} target='_blank'>Direct</a>
123+
<span className={styles.linkDivider}>|</span>
124+
<a className={styles.link} href={orUrl} target='_blank'>OR</a>
125+
</div>
129126
</div>
130127
{challenge.status.toUpperCase() === CHALLENGE_STATUS.DRAFT && (
131128
<button className={styles.activateButton} onClick={() => onUpdateLaunch()}>
@@ -137,17 +134,15 @@ const hoverComponents = (challenge, onUpdateLaunch, deleteModalLaunch) => {
137134
<div className={styles.linkGroup}>
138135
<div className={styles.linkGroupLeft}>
139136
<a className={styles.link} href={communityAppUrl}>View Challenge</a>
140-
{!isTask && (
141-
<div className={styles.linkGroupLeftBottom}>
142-
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
143-
<span className={styles.link}>Direct</span>
144-
</Tooltip>
145-
<span className={styles.linkDivider}>|</span>
146-
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
147-
<span className={styles.link}>OR</span>
148-
</Tooltip>
149-
</div>
150-
)}
137+
<div className={styles.linkGroupLeftBottom}>
138+
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
139+
<span className={styles.link}>Direct</span>
140+
</Tooltip>
141+
<span className={styles.linkDivider}>|</span>
142+
<Tooltip content={MESSAGE.NO_LEGACY_CHALLENGE}>
143+
<span className={styles.link}>OR</span>
144+
</Tooltip>
145+
</div>
151146
</div>
152147
{
153148
challenge.status === 'Draft' && (

0 commit comments

Comments
 (0)