From 5da5c0bbfb80cb5c9cf2699f42d17decc2d60f5b Mon Sep 17 00:00:00 2001
From: Joram Wilander <jwawilander@gmail.com>
Date: Tue, 1 Aug 2017 11:06:53 -0400
Subject: PLT-6987 User access token UI (#7007)

* Add user access token UI

* Fix enter press and update mattermost-redux

* Updating UI for access token stuff (#7066)

* Revert segment key
---
 .../manage_teams_modal/manage_teams_modal.jsx       | 21 ++++++---------------
 1 file changed, 6 insertions(+), 15 deletions(-)

(limited to 'webapp/components/admin_console/manage_teams_modal/manage_teams_modal.jsx')

diff --git a/webapp/components/admin_console/manage_teams_modal/manage_teams_modal.jsx b/webapp/components/admin_console/manage_teams_modal/manage_teams_modal.jsx
index a579ab03c..21f9d762d 100644
--- a/webapp/components/admin_console/manage_teams_modal/manage_teams_modal.jsx
+++ b/webapp/components/admin_console/manage_teams_modal/manage_teams_modal.jsx
@@ -1,11 +1,10 @@
-import PropTypes from 'prop-types';
-
 // Copyright (c) 2017-present Mattermost, Inc. All Rights Reserved.
 // See License.txt for license information.
 
 import React from 'react';
 import {Modal} from 'react-bootstrap';
 import {FormattedMessage} from 'react-intl';
+import PropTypes from 'prop-types';
 
 import * as TeamActions from 'actions/team_actions.jsx';
 
@@ -29,14 +28,6 @@ export default class ManageTeamsModal extends React.Component {
     constructor(props) {
         super(props);
 
-        this.loadTeamsAndTeamMembers = this.loadTeamsAndTeamMembers.bind(this);
-
-        this.handleError = this.handleError.bind(this);
-        this.handleMemberChange = this.handleMemberChange.bind(this);
-        this.handleMemberRemove = this.handleMemberRemove.bind(this);
-
-        this.renderContents = this.renderContents.bind(this);
-
         this.state = {
             error: null,
             teams: null,
@@ -66,7 +57,7 @@ export default class ManageTeamsModal extends React.Component {
         }
     }
 
-    loadTeamsAndTeamMembers(user = this.props.user) {
+    loadTeamsAndTeamMembers = (user = this.props.user) => {
         TeamActions.getTeamsForUser(user.id, (teams) => {
             this.setState({
                 teams: teams.sort(sortTeamsByDisplayName)
@@ -80,13 +71,13 @@ export default class ManageTeamsModal extends React.Component {
         });
     }
 
-    handleError(error) {
+    handleError = (error) => {
         this.setState({
             error
         });
     }
 
-    handleMemberChange() {
+    handleMemberChange = () => {
         TeamActions.getTeamMembersForUser(this.props.user.id, (teamMembers) => {
             this.setState({
                 teamMembers
@@ -94,14 +85,14 @@ export default class ManageTeamsModal extends React.Component {
         });
     }
 
-    handleMemberRemove(teamId) {
+    handleMemberRemove = (teamId) => {
         this.setState({
             teams: this.state.teams.filter((team) => team.id !== teamId),
             teamMembers: this.state.teamMembers.filter((teamMember) => teamMember.team_id !== teamId)
         });
     }
 
-    renderContents() {
+    renderContents = () => {
         const {user} = this.props;
         const {teams, teamMembers} = this.state;
 
-- 
cgit v1.2.3-1-g7c22

