From 2f70a8baf9ee3e163136eaff6d33178b78cc1078 Mon Sep 17 00:00:00 2001 From: enahum Date: Fri, 24 Jun 2016 09:26:54 -0300 Subject: PLT-3225 Fix Channel header disappears after renaming a channel (#3389) --- webapp/components/rename_channel_modal.jsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/components/rename_channel_modal.jsx b/webapp/components/rename_channel_modal.jsx index ed045da91..df08bdbc6 100644 --- a/webapp/components/rename_channel_modal.jsx +++ b/webapp/components/rename_channel_modal.jsx @@ -2,6 +2,7 @@ // See License.txt for license information. import ReactDOM from 'react-dom'; +import TeamStore from 'stores/team_store.jsx'; import * as Utils from 'utils/utils.jsx'; import Client from 'utils/web_client.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; @@ -10,6 +11,7 @@ import Constants from 'utils/constants.jsx'; import {intlShape, injectIntl, defineMessages, FormattedMessage} from 'react-intl'; import {Modal} from 'react-bootstrap'; +import {browserHistory} from 'react-router'; const holders = defineMessages({ required: { @@ -165,8 +167,9 @@ export default class RenameChannelModal extends React.Component { Client.updateChannel( channel, () => { + const team = TeamStore.getCurrent().name; AsyncClient.getChannel(channel.id); - + browserHistory.replace(`/${team}/channels/${channel.name}`); this.handleHide(); }, (err) => { -- cgit v1.2.3-1-g7c22