File tree 1 file changed +10
-6
lines changed
src/shared/components/SubmissionManagement/SubmissionManagement
1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ export default function SubmissionManagement(props) {
52
52
const submissionEndDate = submissionPhase && phaseEndDate ( submissionPhase ) ;
53
53
54
54
const now = moment ( ) ;
55
- const end = moment ( currentPhase . scheduledEndDate ) ;
55
+ const end = moment ( currentPhase && currentPhase . scheduledEndDate ) ;
56
56
const diff = end . isAfter ( now ) ? end . diff ( now ) : 0 ;
57
57
const timeLeft = moment . duration ( diff ) ;
58
58
@@ -81,11 +81,15 @@ export default function SubmissionManagement(props) {
81
81
</ a >
82
82
</ div >
83
83
< div styleName = "right-col" >
84
- < p styleName = "round" >
85
- { currentPhase . name }
86
- </ p >
87
84
{
88
- challenge . status !== 'COMPLETED' ? (
85
+ currentPhase && (
86
+ < p styleName = "round" >
87
+ { currentPhase . name }
88
+ </ p >
89
+ )
90
+ }
91
+ {
92
+ challenge . status !== 'Completed' ? (
89
93
< div >
90
94
< p styleName = "time-left" >
91
95
{ days > 0 && ( `${ days } D` ) }
@@ -114,7 +118,7 @@ export default function SubmissionManagement(props) {
114
118
Manage your submissions
115
119
</ p >
116
120
{
117
- isDesign && (
121
+ isDesign && currentPhase && (
118
122
< p styleName = "round-ends" >
119
123
< span styleName = "ends-label" >
120
124
{ currentPhase . name }
You can’t perform that action at this time.
0 commit comments