From b62e29ba9cd6183551266da05b9b602a4415d738 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 24 Mar 2016 11:05:13 -0400 Subject: Moving all links and redirects to react-router --- webapp/components/login_username.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'webapp/components/login_username.jsx') diff --git a/webapp/components/login_username.jsx b/webapp/components/login_username.jsx index 5fa27f2d5..71874fa1a 100644 --- a/webapp/components/login_username.jsx +++ b/webapp/components/login_username.jsx @@ -6,6 +6,7 @@ import * as Client from 'utils/client.jsx'; import UserStore from 'stores/user_store.jsx'; import {injectIntl, intlShape, defineMessages, FormattedMessage} from 'react-intl'; +import {browserHistory} from 'react-router'; var holders = defineMessages({ badTeam: { @@ -85,9 +86,9 @@ export default class LoginUsername extends React.Component { const redirect = Utils.getUrlParameter('redirect'); if (redirect) { - window.location.href = decodeURIComponent(redirect); + browserHistory.push(decodeURIComponent(redirect)); } else { - window.location.href = '/' + name + '/channels/town-square'; + browserHistory.push('/' + name + '/channels/town-square'); } }, (err) => { -- cgit v1.2.3-1-g7c22