File tree 1 file changed +7
-0
lines changed
src/shared/containers/terms-detail
1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -70,9 +70,15 @@ class TermsDetailPageContainer extends React.Component {
70
70
agreeingTerm,
71
71
agreeTermFailure,
72
72
theme,
73
+ history,
73
74
} = this . props ;
74
75
const { termsAccepted, showModal } = this . state ;
75
76
77
+ if ( details && details . isLegacyTerm && ! history . location . pathname . includes ( details . id ) ) {
78
+ history . location . pathname = `/challenges/terms/detail/${ details . id } ` ; // eslint-disable-line no-param-reassign
79
+ history . push ( history . location . pathname , history . state ) ;
80
+ }
81
+
76
82
return (
77
83
< div className = { theme [ 'outer-container' ] } >
78
84
{
@@ -196,6 +202,7 @@ TermsDetailPageContainer.propTypes = {
196
202
'terms-title' : PT . string . isRequired ,
197
203
modalMsg : PT . any ,
198
204
} ) . isRequired ,
205
+ history : PT . shape ( ) . isRequired ,
199
206
} ;
200
207
201
208
function mapStateToProps ( state , props ) {
You can’t perform that action at this time.
0 commit comments