Files
Jesse Hallam e76203baa0 add eslint-plugin-header, and --fix all (#1140)
* add eslint-plugin-header, and --fix all

While the checking feature of this plugin seems to work great, its --fix
will sometimes removing leading comments when the license header doesn't
match. I've hand-edited the over-zealous removals, so this won't be an
issue going forward except for new files with missing headers but
leading comments.

* fixes from latest master changes

* latest changes from master
2018-04-30 13:31:29 -04:00

34 lines
1.0 KiB
JavaScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {editCommand, getCustomTeamCommands} from 'mattermost-redux/actions/integrations';
import {getCommands} from 'mattermost-redux/selectors/entities/integrations';
import {getConfig} from 'mattermost-redux/selectors/entities/general';
import EditCommand from './edit_command.jsx';
function mapStateToProps(state, ownProps) {
const config = getConfig(state);
const commandId = (new URLSearchParams(ownProps.location.search)).get('id');
const enableCommands = config.EnableCommands === 'true';
return {
commandId,
commands: getCommands(state),
enableCommands,
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
getCustomTeamCommands,
editCommand,
}, dispatch),
};
}
export default connect(mapStateToProps, mapDispatchToProps)(EditCommand);