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/navbar.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'webapp/components/navbar.jsx') 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 (
- {channelTitle} - +
); } -- cgit v1.2.3-1-g7c22