diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-02-08 07:26:10 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-14 00:38:25 -0400 |
commit | d7cdcf082fab6c0cb7c2fe4bed821bd1a8000e69 (patch) | |
tree | 49a0de30cdc2ac461e72a242ae9a5593fcd6c8b9 /web/react/components/login_email.jsx | |
parent | 08f0800adef926e8b69ebea70e4995b89f5c3f3c (diff) | |
download | chat-d7cdcf082fab6c0cb7c2fe4bed821bd1a8000e69.tar.gz chat-d7cdcf082fab6c0cb7c2fe4bed821bd1a8000e69.tar.bz2 chat-d7cdcf082fab6c0cb7c2fe4bed821bd1a8000e69.zip |
Convering client to react-router.
Diffstat (limited to 'web/react/components/login_email.jsx')
-rw-r--r-- | web/react/components/login_email.jsx | 11 |
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); |