summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-24 11:05:13 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-24 11:05:13 -0400
commitb62e29ba9cd6183551266da05b9b602a4415d738 (patch)
treeea759d6d46cc49386bcd66a8b9b8542f75b1c77e /webapp/utils
parent68dad8c7345b12c7d0b10709ddc1873d4b40163e (diff)
downloadchat-b62e29ba9cd6183551266da05b9b602a4415d738.tar.gz
chat-b62e29ba9cd6183551266da05b9b602a4415d738.tar.bz2
chat-b62e29ba9cd6183551266da05b9b602a4415d738.zip
Moving all links and redirects to react-router
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/utils.jsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 1379455ca..ac12edb82 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -17,6 +17,7 @@ import * as client from './client.jsx';
import Autolinker from 'autolinker';
import React from 'react';
+import {browserHistory} from 'react-router';
import {FormattedTime} from 'react-intl';
import icon50 from 'images/icon50x50.png';
@@ -170,7 +171,7 @@ export function notifyMe(title, body, channel) {
if (channel) {
switchChannel(channel);
} else {
- window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/town-square';
+ browserHistory.push(TeamStore.getCurrentTeamUrl() + '/channels/town-square');
}
};
setTimeout(() => {
@@ -1303,7 +1304,7 @@ export function openDirectChannelToUser(user, successCb, errorCb) {
}
},
() => {
- window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/' + channelName;
+ browserHistory.push(TeamStore.getCurrentTeamUrl() + '/channels/' + channelName);
if ($.isFunction(errorCb)) {
errorCb();
}