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';
|
||||
|
||||
export function loadMe() {
|
||||
return UserActions.loadMe()(dispatch, getState).then(() => {
|
||||
if (window.mm_config) {
|
||||
loadCurrentLocale();
|
||||
}
|
||||
});
|
||||
export async function loadMe() {
|
||||
await UserActions.loadMe()(dispatch, getState);
|
||||
|
||||
if (window.mm_config) {
|
||||
loadCurrentLocale();
|
||||
}
|
||||
}
|
||||
|
||||
export function loadMeAndConfig(callback) {
|
||||
|
||||
@@ -27,7 +27,7 @@ export default class Confirm extends React.Component {
|
||||
|
||||
submit(e) {
|
||||
e.preventDefault();
|
||||
loadMe(() => {
|
||||
loadMe().then(() => {
|
||||
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) {
|
||||
trackEvent('signup', 'signup_user_02_complete');
|
||||
loginById(
|
||||
@@ -134,7 +120,7 @@ export default class SignupEmail extends React.Component {
|
||||
BrowserStore.setGlobalItem(this.state.hash, JSON.stringify({usedBefore: true}));
|
||||
}
|
||||
|
||||
loadMe(
|
||||
loadMe().then(
|
||||
() => {
|
||||
const query = this.props.location.query;
|
||||
if (query.redirect_to) {
|
||||
|
||||
@@ -99,7 +99,7 @@ export default class SignupLdap extends React.Component {
|
||||
}
|
||||
|
||||
finishSignup() {
|
||||
loadMe(
|
||||
loadMe().then(
|
||||
() => {
|
||||
const query = this.props.location.query;
|
||||
GlobalActions.loadDefaultLocale();
|
||||
|
||||
@@ -74,7 +74,7 @@ export default class SignupController extends React.Component {
|
||||
hash,
|
||||
inviteId,
|
||||
(team) => {
|
||||
loadMe(
|
||||
loadMe().then(
|
||||
() => {
|
||||
browserHistory.push('/' + team.name + '/channels/town-square');
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user