summaryrefslogtreecommitdiffstats
path: root/webapp/components/integrations/components/commands_container/commands_container.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/components/integrations/components/commands_container/commands_container.jsx')
-rw-r--r--webapp/components/integrations/components/commands_container/commands_container.jsx78
1 files changed, 0 insertions, 78 deletions
diff --git a/webapp/components/integrations/components/commands_container/commands_container.jsx b/webapp/components/integrations/components/commands_container/commands_container.jsx
deleted file mode 100644
index 8f89ff631..000000000
--- a/webapp/components/integrations/components/commands_container/commands_container.jsx
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-import React from 'react';
-import PropTypes from 'prop-types';
-
-export default class CommandsContainer extends React.PureComponent {
- static propTypes = {
-
- /**
- * The team data needed to pass into child components
- */
- team: PropTypes.object,
-
- /**
- * The user data needed to pass into child components
- */
- user: PropTypes.object,
-
- /**
- * The children prop needed to render child component
- */
- children: PropTypes.node.isRequired,
-
- /**
- * Set if user is admin
- */
- isAdmin: PropTypes.bool,
-
- /**
- * The users collection
- */
- users: PropTypes.object,
-
- /**
- * Installed slash commands to display
- */
- commands: PropTypes.array,
-
- actions: PropTypes.shape({
-
- /**
- * The function to call to fetch team commands
- */
- getCustomTeamCommands: PropTypes.func.isRequired
- }).isRequired
- }
-
- constructor(props) {
- super(props);
- this.state = {
- loading: true
- };
- }
-
- componentDidMount() {
- if (window.mm_config.EnableCommands === 'true') {
- this.props.actions.getCustomTeamCommands(this.props.team.id).then(
- () => this.setState({loading: false})
- );
- }
- }
-
- render() {
- return (
- <div>
- {React.cloneElement(this.props.children, {
- loading: this.state.loading,
- commands: this.props.commands || [],
- users: this.props.users,
- team: this.props.team,
- user: this.props.user,
- isAdmin: this.props.isAdmin
- })}
- </div>
- );
- }
-}