From 52aa1120c5d1b09df9de039b9035d89850cebc3a Mon Sep 17 00:00:00 2001 From: enahum Date: Mon, 15 Aug 2016 08:21:57 -0500 Subject: PLT-3777 Channel URL name changes when display name is updated (#3795) --- webapp/components/rename_channel_modal.jsx | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'webapp/components') diff --git a/webapp/components/rename_channel_modal.jsx b/webapp/components/rename_channel_modal.jsx index f83cf110f..46dbe1b89 100644 --- a/webapp/components/rename_channel_modal.jsx +++ b/webapp/components/rename_channel_modal.jsx @@ -2,7 +2,6 @@ // 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 'client/web_client.jsx'; import * as AsyncClient from 'utils/async_client.jsx'; @@ -11,7 +10,6 @@ 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: { @@ -57,7 +55,6 @@ export default class RenameChannelModal extends React.Component { this.onNameChange = this.onNameChange.bind(this); this.onDisplayNameChange = this.onDisplayNameChange.bind(this); - this.displayNameKeyUp = this.displayNameKeyUp.bind(this); this.state = { displayName: props.channel.display_name, @@ -167,9 +164,7 @@ 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) => { @@ -198,15 +193,6 @@ export default class RenameChannelModal extends React.Component { this.setState({displayName: ReactDOM.findDOMNode(this.refs.displayName).value}); } - displayNameKeyUp() { - if (this.state.channelName !== Constants.DEFAULT_CHANNEL) { - const displayName = ReactDOM.findDOMNode(this.refs.displayName).value.trim(); - const channelName = Utils.cleanUpUrlable(displayName); - ReactDOM.findDOMNode(this.refs.channelName).value = channelName; - this.setState({channelName}); - } - } - render() { let displayNameError = null; let displayNameClass = 'form-group'; @@ -260,7 +246,6 @@ export default class RenameChannelModal extends React.Component { />