File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
src/components/ChallengeEditor/ChallengeView Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change 245
245
.actionButtonsRight {
246
246
right : 20px ;
247
247
248
- button :not (:last-child ),
248
+
249
+ .button :not (:last-child ),
249
250
a :not (:last-child ) {
250
251
margin-right : 20px ;
251
252
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ import PhaseInput from '../../PhaseInput'
21
21
import LegacyLinks from '../../LegacyLinks'
22
22
import AssignedMemberField from '../AssignedMember-Field'
23
23
import { getResourceRoleByName } from '../../../util/tc'
24
+ import Tooltip from '../../Tooltip'
24
25
25
26
const ChallengeView = ( {
26
27
projectDetail,
@@ -73,7 +74,16 @@ const ChallengeView = ({
73
74
< div className = { cn ( styles . actionButtons , styles . button , styles . actionButtonsRight ) } >
74
75
{
75
76
challenge . status === 'Draft' && (
76
- < PrimaryButton text = { 'Launch' } type = { 'info' } onClick = { onLaunchChallenge } />
77
+ < div className = { styles . button } >
78
+ { challenge . legacyId ? (
79
+ < PrimaryButton text = { 'Launch' } type = { 'info' } onClick = { onLaunchChallenge } />
80
+ ) : (
81
+ < Tooltip content = 'Legacy project is not yet created' >
82
+ { /* Don't disable button for real inside tooltip, otherwise mouseEnter/Leave events work not good */ }
83
+ < PrimaryButton text = { 'Launch' } type = { 'disabled' } />
84
+ </ Tooltip >
85
+ ) }
86
+ </ div >
77
87
)
78
88
}
79
89
{ enableEdit && < PrimaryButton text = { 'Edit' } type = { 'info' } submit link = { `./edit` } /> }
You can’t perform that action at this time.
0 commit comments