summaryrefslogtreecommitdiffstats
path: root/webapp/components/create_post.jsx
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/components/create_post.jsx
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/components/create_post.jsx')
-rw-r--r--webapp/components/create_post.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/webapp/components/create_post.jsx b/webapp/components/create_post.jsx
index e5e99debd..025333d97 100644
--- a/webapp/components/create_post.jsx
+++ b/webapp/components/create_post.jsx
@@ -23,6 +23,7 @@ import PreferenceStore from 'stores/preference_store.jsx';
import Constants from 'utils/constants.jsx';
import {intlShape, injectIntl, defineMessages, FormattedHTMLMessage} from 'react-intl';
+import {browserHistory} from 'react-router';
const Preferences = Constants.Preferences;
const TutorialSteps = Constants.TutorialSteps;
@@ -136,7 +137,7 @@ class CreatePost extends React.Component {
this.setState({messageText: '', submitting: false, postError: null, previews: [], serverError: null});
if (data.goto_location && data.goto_location.length > 0) {
- window.location.href = data.goto_location;
+ browserHistory.push(data.goto_location);
}
},
(err) => {