blob: 2a8257113a07f480fad8aaeb201c2e8f24375142 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import {getCustomTeamCommands, editCommand} from 'mattermost-redux/actions/integrations';
import {getCommands} from 'mattermost-redux/selectors/entities/integrations';
import EditCommand from './edit_command.jsx';
function mapStateToProps(state, ownProps) {
const commandId = ownProps.location.query.id;
return {
...ownProps,
commandId,
commands: getCommands(state),
editCommandRequest: state.requests.integrations.editCommand
};
}
function mapDispatchToProps(dispatch) {
return {
actions: bindActionCreators({
getCustomTeamCommands,
editCommand
}, dispatch)
};
}
export default connect(mapStateToProps, mapDispatchToProps)(EditCommand);
|