From 68ea0abfa665144164041c9421899bfc21412f8a Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Tue, 20 Jun 2017 15:22:46 -0400 Subject: PLT-4457 Added AtMention component to better render at mentions (#6563) * Moved Utils.searchForTerm into an action * Added easier importing of index.jsx files * PLT-4457 Added AtMention component to better render at mentions * Fixed client unit tests * Fixed merge conflict * Fixed merge conflicts --- webapp/components/at_mention/index.jsx | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 webapp/components/at_mention/index.jsx (limited to 'webapp/components/at_mention/index.jsx') diff --git a/webapp/components/at_mention/index.jsx b/webapp/components/at_mention/index.jsx new file mode 100644 index 000000000..c733158c6 --- /dev/null +++ b/webapp/components/at_mention/index.jsx @@ -0,0 +1,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); -- cgit v1.2.3-1-g7c22