File tree 1 file changed +9
-5
lines changed
src/shared/components/SubmissionManagement/SubmissionManagement
1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export default function SubmissionManagement(props) {
49
49
. sort ( ( a , b ) => moment ( a . scheduledEndDate ) . diff ( b . scheduledEndDate ) ) [ 0 ] ;
50
50
51
51
const now = moment ( ) ;
52
- const end = moment ( currentPhase . scheduledEndDate ) ;
52
+ const end = moment ( currentPhase && currentPhase . scheduledEndDate ) ;
53
53
const diff = end . isAfter ( now ) ? end . diff ( now ) : 0 ;
54
54
const timeLeft = moment . duration ( diff ) ;
55
55
@@ -78,9 +78,13 @@ export default function SubmissionManagement(props) {
78
78
</ a >
79
79
</ div >
80
80
< div styleName = "right-col" >
81
- < p styleName = "round" >
82
- { currentPhase . name }
83
- </ p >
81
+ {
82
+ currentPhase && (
83
+ < p styleName = "round" >
84
+ { currentPhase . name }
85
+ </ p >
86
+ )
87
+ }
84
88
{
85
89
challenge . status !== 'COMPLETED' ? (
86
90
< div >
@@ -111,7 +115,7 @@ export default function SubmissionManagement(props) {
111
115
Manage your submissions
112
116
</ p >
113
117
{
114
- isDesign && (
118
+ isDesign && currentPhase && (
115
119
< p styleName = "round-ends" >
116
120
< span styleName = "ends-label" >
117
121
{ currentPhase . name }
You can’t perform that action at this time.
0 commit comments