From 34fea139f2619dfde5a41394ffb433337e23a4e5 Mon Sep 17 00:00:00 2001 From: Andrew Nicolaou Date: Wed, 15 May 2019 16:40:09 +0200 Subject: [PATCH] Fixes Account back behaviour --- client/modules/User/pages/AccountView.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/modules/User/pages/AccountView.jsx b/client/modules/User/pages/AccountView.jsx index 12f6f040..c5b63512 100644 --- a/client/modules/User/pages/AccountView.jsx +++ b/client/modules/User/pages/AccountView.jsx @@ -28,7 +28,7 @@ class AccountView extends React.Component { } closeAccountPage() { - browserHistory.goBack(); + browserHistory.push(this.props.previousPath); } gotoHomePage() { @@ -79,6 +79,7 @@ class AccountView extends React.Component { function mapStateToProps(state) { return { initialValues: state.user, // <- initialValues for reduxForm + previousPath: state.ide.previousPath, user: state.user, apiKeys: state.user.apiKeys, theme: state.preferences.theme @@ -110,6 +111,7 @@ function asyncValidate(formProps, dispatch, props) { } AccountView.propTypes = { + previousPath: PropTypes.string.isRequired, theme: PropTypes.string.isRequired };