We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents f0517d3 + 904be23 commit edf57c8Copy full SHA for edf57c8
src/shared/containers/terms-detail/index.jsx
@@ -70,9 +70,15 @@ class TermsDetailPageContainer extends React.Component {
70
agreeingTerm,
71
agreeTermFailure,
72
theme,
73
+ history,
74
} = this.props;
75
const { termsAccepted, showModal } = this.state;
76
77
+ if (details && details.isLegacyTerm && !history.location.pathname.includes(details.id)) {
78
+ const path = `/challenges/terms/detail/${details.id}`;
79
+ history.push(path, history.state);
80
+ }
81
+
82
return (
83
<div className={theme['outer-container']}>
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) {
0 commit comments