// Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. var SettingItemMin = require('../setting_item_min.jsx'); var SettingItemMax = require('../setting_item_max.jsx'); var ManageIncomingHooks = require('./manage_incoming_hooks.jsx'); export default class UserSettingsIntegrationsTab extends React.Component { constructor(props) { super(props); this.updateSection = this.updateSection.bind(this); this.handleClose = this.handleClose.bind(this); this.state = {}; } updateSection(section) { this.props.updateSection(section); } handleClose() { this.updateSection(''); } componentDidMount() { $('#user_settings').on('hidden.bs.modal', this.handleClose); } componentWillUnmount() { $('#user_settings').off('hidden.bs.modal', this.handleClose); } render() { let incomingHooksSection; var inputs = []; if (this.props.activeSection === 'incoming-hooks') { inputs.push( ); incomingHooksSection = ( ); } else { incomingHooksSection = ( ); } return (

{'Integration Settings'}

{'Integration Settings'}

{incomingHooksSection}
); } } UserSettingsIntegrationsTab.propTypes = { user: React.PropTypes.object, updateSection: React.PropTypes.func, updateTab: React.PropTypes.func, activeSection: React.PropTypes.string };