Skip to content

Commit 62ea935

Browse files
committed
Read only fix
1 parent a15e466 commit 62ea935

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/components/ChallengeEditor/ChallengeViewTabs/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const ChallengeViewTabs = ({
128128
styles.actionButtonsRight
129129
)}
130130
>
131-
{(isDraft || challenge.status === 'New') && !isReadOnly && !isSelfService &&
131+
{enableEdit && (isDraft || challenge.status === 'New') && !isReadOnly && !isSelfService &&
132132
(<div className={styles['cancel-button']}><CancelDropDown challenge={challenge} onSelectMenu={cancelChallenge} /></div>)}
133133
{canLaunch && (
134134
<div className={styles.button}>

src/components/PhaseInput/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ const PhaseInput = ({ onUpdatePhase, phase, readOnly, phaseIndex }) => {
3232
}
3333

3434
useEffect(() => {
35-
if (!startDate) {
35+
if (!startDate && onUpdatePhase) {
3636
let startDate = moment().format(dateFormat)
3737
let endDate = getEndDate(startDate, duration)
3838
onUpdatePhase({

0 commit comments

Comments
 (0)