diff options
Diffstat (limited to 'webapp/components/backstage/add_outgoing_webhook.jsx')
-rw-r--r-- | webapp/components/backstage/add_outgoing_webhook.jsx | 27 |
1 files changed, 2 insertions, 25 deletions
diff --git a/webapp/components/backstage/add_outgoing_webhook.jsx b/webapp/components/backstage/add_outgoing_webhook.jsx index ea530ff57..3ae2f8606 100644 --- a/webapp/components/backstage/add_outgoing_webhook.jsx +++ b/webapp/components/backstage/add_outgoing_webhook.jsx @@ -5,7 +5,6 @@ import React from 'react'; import * as AsyncClient from 'utils/async_client.jsx'; import {browserHistory} from 'react-router'; -import TeamStore from 'stores/team_store.jsx'; import ChannelSelect from 'components/channel_select.jsx'; import {FormattedMessage} from 'react-intl'; @@ -17,7 +16,6 @@ export default class AddOutgoingWebhook extends React.Component { constructor(props) { super(props); - this.handleChange = this.handleChange.bind(this); this.handleSubmit = this.handleSubmit.bind(this); this.updateName = this.updateName.bind(this); @@ -27,7 +25,6 @@ export default class AddOutgoingWebhook extends React.Component { this.updateCallbackUrls = this.updateCallbackUrls.bind(this); this.state = { - team: TeamStore.getCurrent(), name: '', description: '', channelId: '', @@ -39,20 +36,6 @@ export default class AddOutgoingWebhook extends React.Component { }; } - componentDidMount() { - TeamStore.addChangeListener(this.handleChange); - } - - componentWillUnmount() { - TeamStore.removeChangeListener(this.handleChange); - } - - handleChange() { - this.setState({ - team: TeamStore.getCurrent() - }); - } - handleSubmit(e) { e.preventDefault(); @@ -103,7 +86,7 @@ export default class AddOutgoingWebhook extends React.Component { AsyncClient.addOutgoingHook( hook, () => { - browserHistory.push(`/${this.state.team.name}/integrations/installed`); + browserHistory.push('/settings/integrations/installed'); }, (err) => { this.setState({ @@ -144,12 +127,6 @@ export default class AddOutgoingWebhook extends React.Component { } render() { - const team = TeamStore.getCurrent(); - - if (!team) { - return null; - } - return ( <div className='backstage row'> <div className='add-outgoing-webhook'> @@ -250,7 +227,7 @@ export default class AddOutgoingWebhook extends React.Component { <div className='add-integration__submit-row'> <Link className='btn btn-sm' - to={`/${team.name}/integrations/add`} + to={'/settings/integrations/add'} > <FormattedMessage id='add_outgoing_webhook.cancel' |