Skip to content

Commit edf57c8

Browse files
Merge pull request #4990 from narekcat/issue-4784
fix: for issue #4784
2 parents f0517d3 + 904be23 commit edf57c8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/shared/containers/terms-detail/index.jsx

+7
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,15 @@ class TermsDetailPageContainer extends React.Component {
7070
agreeingTerm,
7171
agreeTermFailure,
7272
theme,
73+
history,
7374
} = this.props;
7475
const { termsAccepted, showModal } = this.state;
7576

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+
7682
return (
7783
<div className={theme['outer-container']}>
7884
{
@@ -196,6 +202,7 @@ TermsDetailPageContainer.propTypes = {
196202
'terms-title': PT.string.isRequired,
197203
modalMsg: PT.any,
198204
}).isRequired,
205+
history: PT.shape().isRequired,
199206
};
200207

201208
function mapStateToProps(state, props) {

0 commit comments

Comments
 (0)