File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,19 @@ class SubmissionsPageContainer extends React.Component {
40
40
getCommunitiesList ( auth ) ;
41
41
}
42
42
43
+ componentWillReceiveProps ( ) {
44
+ const {
45
+ challenge,
46
+ history,
47
+ } = this . props ;
48
+
49
+ const { details } = challenge ;
50
+
51
+ if ( details && details . isLegacyChallenge && ! history . location . pathname . includes ( details . id ) ) {
52
+ history . push ( `/challenges/${ details . id } /submit` , history . state ) ;
53
+ }
54
+ }
55
+
43
56
/* A child component has called their submitForm() prop, prepare the passed
44
57
form data for submission and create a submit action */
45
58
handleSubmit ( body ) {
@@ -150,6 +163,7 @@ SubmissionsPageContainer.propTypes = {
150
163
submissionFilestackData : filestackDataProp . isRequired ,
151
164
winners : PT . arrayOf ( PT . object ) . isRequired ,
152
165
loadChallengeDetails : PT . func . isRequired ,
166
+ history : PT . shape ( ) . isRequired ,
153
167
} ;
154
168
155
169
/**
You can’t perform that action at this time.
0 commit comments