Fix account creation redirect (#6765)
Этот коммит содержится в:
коммит произвёл
enahum
родитель
a32f6f7733
Коммит
5492ca28b1
@@ -32,12 +32,12 @@ import {savePreferences as savePreferencesRedux, deletePreferences} from 'matter
|
|||||||
|
|
||||||
import {Preferences as PreferencesRedux} from 'mattermost-redux/constants';
|
import {Preferences as PreferencesRedux} from 'mattermost-redux/constants';
|
||||||
|
|
||||||
export function loadMe() {
|
export async function loadMe() {
|
||||||
return UserActions.loadMe()(dispatch, getState).then(() => {
|
await UserActions.loadMe()(dispatch, getState);
|
||||||
if (window.mm_config) {
|
|
||||||
loadCurrentLocale();
|
if (window.mm_config) {
|
||||||
}
|
loadCurrentLocale();
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function loadMeAndConfig(callback) {
|
export function loadMeAndConfig(callback) {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ export default class Confirm extends React.Component {
|
|||||||
|
|
||||||
submit(e) {
|
submit(e) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
loadMe(() => {
|
loadMe().then(() => {
|
||||||
browserHistory.push('/');
|
browserHistory.push('/');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -109,20 +109,6 @@ export default class SignupEmail extends React.Component {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
finishSignup() {
|
|
||||||
loadMe(
|
|
||||||
() => {
|
|
||||||
const query = this.props.location.query;
|
|
||||||
GlobalActions.loadDefaultLocale();
|
|
||||||
if (query.redirect_to) {
|
|
||||||
browserHistory.push(query.redirect_to);
|
|
||||||
} else {
|
|
||||||
GlobalActions.redirectUserToDefaultTeam();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
handleSignupSuccess(user, data) {
|
handleSignupSuccess(user, data) {
|
||||||
trackEvent('signup', 'signup_user_02_complete');
|
trackEvent('signup', 'signup_user_02_complete');
|
||||||
loginById(
|
loginById(
|
||||||
@@ -134,7 +120,7 @@ export default class SignupEmail extends React.Component {
|
|||||||
BrowserStore.setGlobalItem(this.state.hash, JSON.stringify({usedBefore: true}));
|
BrowserStore.setGlobalItem(this.state.hash, JSON.stringify({usedBefore: true}));
|
||||||
}
|
}
|
||||||
|
|
||||||
loadMe(
|
loadMe().then(
|
||||||
() => {
|
() => {
|
||||||
const query = this.props.location.query;
|
const query = this.props.location.query;
|
||||||
if (query.redirect_to) {
|
if (query.redirect_to) {
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ export default class SignupLdap extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
finishSignup() {
|
finishSignup() {
|
||||||
loadMe(
|
loadMe().then(
|
||||||
() => {
|
() => {
|
||||||
const query = this.props.location.query;
|
const query = this.props.location.query;
|
||||||
GlobalActions.loadDefaultLocale();
|
GlobalActions.loadDefaultLocale();
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ export default class SignupController extends React.Component {
|
|||||||
hash,
|
hash,
|
||||||
inviteId,
|
inviteId,
|
||||||
(team) => {
|
(team) => {
|
||||||
loadMe(
|
loadMe().then(
|
||||||
() => {
|
() => {
|
||||||
browserHistory.push('/' + team.name + '/channels/town-square');
|
browserHistory.push('/' + team.name + '/channels/town-square');
|
||||||
}
|
}
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user