summaryrefslogtreecommitdiffstats
path: root/webapp/components/at_mention/index.jsx
blob: c733158c6e08e7fc24f1644b8567e86b731cf9b8 (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
// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.

import {connect} from 'react-redux';

import {getUsersByUsername} from 'mattermost-redux/selectors/entities/users';

import {searchForTerm} from 'actions/post_actions.jsx';

import AtMention from './at_mention.jsx';

function mapStateToProps(state, ownProps) {
    return {
        ...ownProps,
        usersByUsername: getUsersByUsername(state)
    };
}

function mapDispatchToProps() {
    return {
        actions: {
            searchForTerm
        }
    };
}

export default connect(mapStateToProps, mapDispatchToProps)(AtMention);