web: my profile: fix onBack navigation in updateUserForm
This commit is contained in:
parent
0af3acb46b
commit
b6fa346fc0
@ -303,9 +303,9 @@ class UpdateUserForm extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onCancel() {
|
onCancel() {
|
||||||
const { filter, setFilter, history } = this.props;
|
const { filter, setFilter, history, personal } = this.props;
|
||||||
|
|
||||||
if (document.referrer) {
|
if (document.referrer || personal) {
|
||||||
history.goBack();
|
history.goBack();
|
||||||
} else {
|
} else {
|
||||||
history.push(combineUrl(AppServerConfig.proxyURL, config.homepage));
|
history.push(combineUrl(AppServerConfig.proxyURL, config.homepage));
|
||||||
@ -943,6 +943,7 @@ export default withRouter(
|
|||||||
getUserPhoto: peopleStore.targetUserStore.getUserPhoto,
|
getUserPhoto: peopleStore.targetUserStore.getUserPhoto,
|
||||||
disableProfileType: peopleStore.targetUserStore.getDisableProfileType,
|
disableProfileType: peopleStore.targetUserStore.getDisableProfileType,
|
||||||
isSelf: peopleStore.targetUserStore.isMe,
|
isSelf: peopleStore.targetUserStore.isMe,
|
||||||
|
personal: auth.settingsStore.personal,
|
||||||
}))(
|
}))(
|
||||||
observer(
|
observer(
|
||||||
withTranslation(["ProfileAction", "Common", "Translations"])(
|
withTranslation(["ProfileAction", "Common", "Translations"])(
|
||||||
|
Loading…
Reference in New Issue
Block a user