summaryrefslogtreecommitdiffstats
path: root/webapp/components/integrations/components/installed_oauth_apps/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/integrations/components/installed_oauth_apps/index.js')
-rw-r--r--webapp/components/integrations/components/installed_oauth_apps/index.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/webapp/components/integrations/components/installed_oauth_apps/index.js b/webapp/components/integrations/components/installed_oauth_apps/index.js
new file mode 100644
index 000000000..85d2a5ba7
--- /dev/null
+++ b/webapp/components/integrations/components/installed_oauth_apps/index.js
@@ -0,0 +1,29 @@
+// Copyright (c) 2017 Mattermost, Inc. All Rights Reserved.
+// See License.txt for license information.
+
+import {connect} from 'react-redux';
+import {bindActionCreators} from 'redux';
+import * as Actions from 'mattermost-redux/actions/integrations';
+import {getOAuthApps} from 'mattermost-redux/selectors/entities/integrations';
+import {isCurrentUserSystemAdmin} from 'mattermost-redux/selectors/entities/users';
+
+import InstalledOAuthApps from './installed_oauth_apps.jsx';
+
+function mapStateToProps(state, ownProps) {
+ return {
+ ...ownProps,
+ oauthApps: getOAuthApps(state),
+ isSystemAdmin: isCurrentUserSystemAdmin(state)
+ };
+}
+
+function mapDispatchToProps(dispatch) {
+ return {
+ actions: bindActionCreators({
+ getOAuthApps: Actions.getOAuthApps,
+ deleteOAuthApp: Actions.deleteOAuthApp
+ }, dispatch)
+ };
+}
+
+export default connect(mapStateToProps, mapDispatchToProps)(InstalledOAuthApps); \ No newline at end of file