Skip to content

Commit 05f0029

Browse files
add reject button
1 parent 1c84971 commit 05f0029

File tree

1 file changed

+10
-1
lines changed
  • src/components/ChallengeEditor/ChallengeViewTabs

1 file changed

+10
-1
lines changed

src/components/ChallengeEditor/ChallengeViewTabs/index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ const ChallengeViewTabs = ({
8282
const isTask = _.get(challenge, 'task.isTask', false)
8383

8484
const isSelfService = challenge.legacy.selfService
85-
const launchText = `${isSelfService && challenge.status.toUpperCase() === CHALLENGE_STATUS.DRAFT ? 'Approve and ' : ''}Launch`
85+
const isDraft = challenge.status.toUpperCase() === CHALLENGE_STATUS.DRAFT
86+
const launchText = `${isSelfService && isDraft ? 'Approve and ' : ''}Launch`
8687

8788
return (
8889
<div className={styles.list}>
@@ -146,6 +147,14 @@ const ChallengeViewTabs = ({
146147
{enableEdit && !isSelfService && (
147148
<PrimaryButton text={'Edit'} type={'info'} submit link={`./edit`} />
148149
)}
150+
{isSelfService && isDraft &&
151+
(
152+
<PrimaryButton
153+
text={'Reject challenge'}
154+
type={'danger'}
155+
onClick={onLaunchChallenge} // TODO
156+
/>
157+
)}
149158
<PrimaryButton text={'Back'} type={'info'} submit link={`..`} />
150159
</div>
151160
</div>

0 commit comments

Comments
 (0)