Fixes Account back behaviour
This commit is contained in:
parent
3cedf37647
commit
34fea139f2
1 changed files with 3 additions and 1 deletions
|
@ -28,7 +28,7 @@ class AccountView extends React.Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
closeAccountPage() {
|
closeAccountPage() {
|
||||||
browserHistory.goBack();
|
browserHistory.push(this.props.previousPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
gotoHomePage() {
|
gotoHomePage() {
|
||||||
|
@ -79,6 +79,7 @@ class AccountView extends React.Component {
|
||||||
function mapStateToProps(state) {
|
function mapStateToProps(state) {
|
||||||
return {
|
return {
|
||||||
initialValues: state.user, // <- initialValues for reduxForm
|
initialValues: state.user, // <- initialValues for reduxForm
|
||||||
|
previousPath: state.ide.previousPath,
|
||||||
user: state.user,
|
user: state.user,
|
||||||
apiKeys: state.user.apiKeys,
|
apiKeys: state.user.apiKeys,
|
||||||
theme: state.preferences.theme
|
theme: state.preferences.theme
|
||||||
|
@ -110,6 +111,7 @@ function asyncValidate(formProps, dispatch, props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountView.propTypes = {
|
AccountView.propTypes = {
|
||||||
|
previousPath: PropTypes.string.isRequired,
|
||||||
theme: PropTypes.string.isRequired
|
theme: PropTypes.string.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue