forked from mattermost/mattermost-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
23 lines (15 loc) · 608 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {connect} from 'react-redux';
import {getPluginId} from 'selectors/rhs';
import RHSPlugin from './rhs_plugin.jsx';
function mapStateToProps(state) {
const rhsPlugins = state.plugins.components.RightHandSidebarComponent;
const pluginId = getPluginId(state);
const pluginName = rhsPlugins.find((element) => element.id === pluginId).title;
return {
title: pluginName,
pluggableId: pluginId,
};
}
export default connect(mapStateToProps)(RHSPlugin);