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/navbar.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/navbar.jsx')
-rw-r--r-- | webapp/components/navbar.jsx | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/webapp/components/navbar.jsx b/webapp/components/navbar.jsx index 520f05ed0..e58e142d0 100644 --- a/webapp/components/navbar.jsx +++ b/webapp/components/navbar.jsx @@ -30,6 +30,8 @@ import {FormattedMessage} from 'react-intl'; import {Popover, OverlayTrigger} from 'react-bootstrap'; +import {Link, browserHistory} from 'react-router'; + import React from 'react'; export default class Navbar extends React.Component { @@ -81,7 +83,7 @@ export default class Navbar extends React.Component { Client.leaveChannel(this.state.channel.id, () => { AsyncClient.getChannels(true); - window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/town-square'; + browserHistory.push(TeamStore.getCurrentTeamUrl() + '/channels/town-square'); }, (err) => { AsyncClient.dispatchError(err, 'handleLeave'); @@ -349,12 +351,12 @@ export default class Navbar extends React.Component { return ( <div className='navbar-brand'> - <a - href={TeamStore.getCurrentTeamUrl() + '/channels/town-square'} + <Link + to={TeamStore.getCurrentTeamUrl() + '/channels/town-square'} className='heading' > {channelTitle} - </a> + </Link> </div> ); } |