summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorenahum <nahumhbl@gmail.com>2016-06-24 09:26:54 -0300
committerChristopher Speller <crspeller@gmail.com>2016-06-24 08:26:54 -0400
commit2f70a8baf9ee3e163136eaff6d33178b78cc1078 (patch)
treeaf31758a3b3990ffaff109eb15021e2933ae5dd5
parentae1851e63383f62f4fab7e1a62e7e903bbd5a30c (diff)
downloadchat-2f70a8baf9ee3e163136eaff6d33178b78cc1078.tar.gz
chat-2f70a8baf9ee3e163136eaff6d33178b78cc1078.tar.bz2
chat-2f70a8baf9ee3e163136eaff6d33178b78cc1078.zip
PLT-3225 Fix Channel header disappears after renaming a channel (#3389)
-rw-r--r--webapp/components/rename_channel_modal.jsx5
1 files changed, 4 insertions, 1 deletions
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) => {