From f94e992aed34900ce2b007d2f6db9227afcad65d Mon Sep 17 00:00:00 2001 From: Nursoltan Saipolda Date: Mon, 28 Mar 2022 11:04:08 +0800 Subject: [PATCH] additiional fixes --- src/components/ChallengeEditor/index.js | 5 +---- src/components/PhaseInput/index.js | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/components/ChallengeEditor/index.js b/src/components/ChallengeEditor/index.js index c81e9bd4..1c7bc911 100644 --- a/src/components/ChallengeEditor/index.js +++ b/src/components/ChallengeEditor/index.js @@ -1243,10 +1243,7 @@ class ChallengeEditor extends Component { isPhaseEditable (phaseIndex) { const { phases } = this.state.challenge const phase = phases[phaseIndex] - if (phase.name === 'Registration' && moment(phase.scheduledEndDate).isAfter(moment())) { - return true - } - if (!phase.isOpen) { + if (phase.name !== 'Registration') { return false } return moment(phase.scheduledEndDate).isAfter(moment()) diff --git a/src/components/PhaseInput/index.js b/src/components/PhaseInput/index.js index d006747b..a85686fb 100644 --- a/src/components/PhaseInput/index.js +++ b/src/components/PhaseInput/index.js @@ -128,7 +128,7 @@ const PhaseInput = ({ onUpdatePhase, phase, readOnly, phaseIndex, isActive }) => name={phase.name} onDurationChange={onDurationChange} index={phaseIndex} - isActive={isActive} + isActive />}