diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-24 11:05:13 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-24 11:05:13 -0400 |
commit | b62e29ba9cd6183551266da05b9b602a4415d738 (patch) | |
tree | ea759d6d46cc49386bcd66a8b9b8542f75b1c77e /webapp/components/sidebar.jsx | |
parent | 68dad8c7345b12c7d0b10709ddc1873d4b40163e (diff) | |
download | chat-b62e29ba9cd6183551266da05b9b602a4415d738.tar.gz chat-b62e29ba9cd6183551266da05b9b602a4415d738.tar.bz2 chat-b62e29ba9cd6183551266da05b9b602a4415d738.zip |
Moving all links and redirects to react-router
Diffstat (limited to 'webapp/components/sidebar.jsx')
-rw-r--r-- | webapp/components/sidebar.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx index 0e1b7dd0e..c0d4755ed 100644 --- a/webapp/components/sidebar.jsx +++ b/webapp/components/sidebar.jsx @@ -29,6 +29,7 @@ import {Tooltip, OverlayTrigger} from 'react-bootstrap'; import loadingGif from 'images/load.gif'; import React from 'react'; +import {browserHistory} from 'react-router'; import favicon from 'images/favicon/favicon-16x16.png'; import redFavicon from 'images/favicon/redfavicon-16x16.png'; @@ -407,7 +408,6 @@ export default class Sidebar extends React.Component { // set up click handler to switch channels (or create a new channel for non-existant ones) var handleClick = null; - var href = '#'; if (!channel.fake) { handleClick = function clickHandler(e) { @@ -440,7 +440,7 @@ export default class Sidebar extends React.Component { }, () => { this.setState({loadingDMChannel: -1}); - window.location.href = '/' + this.state.currentTeam.name; + browserHistory('/' + this.state.currentTeam.name); } ); } @@ -489,7 +489,7 @@ export default class Sidebar extends React.Component { > <a className={rowClass} - href={href} + href={'#'} onClick={handleClick} > {icon} |