summaryrefslogtreecommitdiffstats
path: root/web/react/components/login_email.jsx
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2016-03-14 10:23:51 -0700
committer=Corey Hulen <corey@hulen.com>2016-03-14 10:23:51 -0700
commitea3f25924ea64a2dd1e73624c0d30824e1efb240 (patch)
treea4a2b2bdc37bd675fb89837713995ad44a27427b /web/react/components/login_email.jsx
parent397ebec88c2db3569efd77238bf877e976492d34 (diff)
parentbf7ae0711743926cfbb031675cc3320d7a942465 (diff)
downloadchat-ea3f25924ea64a2dd1e73624c0d30824e1efb240.tar.gz
chat-ea3f25924ea64a2dd1e73624c0d30824e1efb240.tar.bz2
chat-ea3f25924ea64a2dd1e73624c0d30824e1efb240.zip
Merge branch 'master' into PLT-2115
Diffstat (limited to 'web/react/components/login_email.jsx')
-rw-r--r--web/react/components/login_email.jsx11
1 files changed, 3 insertions, 8 deletions
diff --git a/web/react/components/login_email.jsx b/web/react/components/login_email.jsx
index cf1e1bc40..3e0d8919d 100644
--- a/web/react/components/login_email.jsx
+++ b/web/react/components/login_email.jsx
@@ -4,6 +4,7 @@
import * as Utils from '../utils/utils.jsx';
import * as Client from '../utils/client.jsx';
import UserStore from '../stores/user_store.jsx';
+import {browserHistory} from 'react-router';
import {injectIntl, intlShape, defineMessages, FormattedMessage} from 'mm-intl';
@@ -72,13 +73,7 @@ class LoginEmail extends React.Component {
Client.loginByEmail(name, email, password,
() => {
UserStore.setLastEmail(email);
-
- const redirect = Utils.getUrlParameter('redirect');
- if (redirect) {
- window.location.href = decodeURIComponent(redirect);
- } else {
- window.location.href = '/' + name + '/channels/town-square';
- }
+ browserHistory.push('/' + name + '/channels/town-square');
},
(err) => {
if (err.id === 'api.user.login.not_verified.app_error') {
@@ -167,4 +162,4 @@ LoginEmail.propTypes = {
teamName: React.PropTypes.string.isRequired
};
-export default injectIntl(LoginEmail); \ No newline at end of file
+export default injectIntl(LoginEmail);