Merge pull request #2610 from mattermost/plt-2490
PLT-2490, PLT-2452 Fixing signup flow. Better root redirect. Fixes back buttons.
Этот коммит содержится в:
@@ -158,23 +158,6 @@ function preLoggedIn(nextState, replace, callback) {
|
||||
});
|
||||
}
|
||||
|
||||
function onRootEnter(nextState, replace, callback) {
|
||||
if (nextState.location.pathname === '/') {
|
||||
Client.getMeLoggedIn((data) => {
|
||||
if (!data || data.logged_in === 'false') {
|
||||
replace({pathname: '/signup_team'});
|
||||
callback();
|
||||
} else {
|
||||
replace({pathname: '/' + data.team_name + '/channels/town-square'});
|
||||
callback();
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
callback();
|
||||
}
|
||||
|
||||
function onPermalinkEnter(nextState) {
|
||||
const postId = nextState.params.postid;
|
||||
|
||||
@@ -225,7 +208,6 @@ function renderRootComponent() {
|
||||
<Route
|
||||
path='/'
|
||||
component={Root}
|
||||
onEnter={onRootEnter}
|
||||
>
|
||||
<Route
|
||||
path='error'
|
||||
@@ -332,7 +314,7 @@ function renderRootComponent() {
|
||||
component={TeamURLPage}
|
||||
/>
|
||||
<Route
|
||||
path='invites'
|
||||
path='send_invites'
|
||||
component={SendInivtesPage}
|
||||
/>
|
||||
<Route
|
||||
|
||||
Ссылка в новой задаче
Block a user