From 84044fca1cc50342be75dad7b0bba666cb5ee9c0 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Dec 2018 11:09:11 +0100 Subject: [PATCH] fix lint --- src/components/structures/MainSplit.js | 1 - src/components/structures/MyGroups.js | 1 - src/components/structures/RightPanel.js | 10 ---------- src/components/views/groups/GroupMemberList.js | 11 +++++++---- src/components/views/groups/GroupRoomList.js | 9 +++++++-- .../views/right_panel/GroupHeaderButtons.js | 1 - src/components/views/right_panel/HeaderButtons.js | 1 - src/components/views/right_panel/RoomHeaderButtons.js | 1 - 8 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/components/structures/MainSplit.js b/src/components/structures/MainSplit.js index ea3a97e161..6fd0274f1a 100644 --- a/src/components/structures/MainSplit.js +++ b/src/components/structures/MainSplit.js @@ -19,7 +19,6 @@ import ResizeHandle from '../views/elements/ResizeHandle'; import {Resizer, FixedDistributor} from '../../resizer'; export default class MainSplit extends React.Component { - constructor(props) { super(props); this._setResizeContainerRef = this._setResizeContainerRef.bind(this); diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index 3ad1a00361..c5bf74d561 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -60,7 +60,6 @@ export default withMatrixClient(React.createClass({ render: function() { const Loader = sdk.getComponent("elements.Spinner"); const SimpleRoomHeader = sdk.getComponent('rooms.SimpleRoomHeader'); - const TintableSvg = sdk.getComponent("elements.TintableSvg"); const GroupTile = sdk.getComponent("groups.GroupTile"); const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper"); diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 3687764712..be40957673 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -20,17 +20,14 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import { _t } from '../../languageHandler'; import sdk from '../../index'; import dis from '../../dispatcher'; import { MatrixClient } from 'matrix-js-sdk'; import RateLimitedFunc from '../../ratelimitedfunc'; -import AccessibleButton from '../../components/views/elements/AccessibleButton'; import { showGroupInviteDialog, showGroupAddRoomDialog } from '../../GroupAddressPicker'; import GroupStore from '../../stores/GroupStore'; export default class RightPanel extends React.Component { - static get propTypes() { return { roomId: React.PropTypes.string, // if showing panels for a given room, this is set @@ -159,13 +156,6 @@ export default class RightPanel extends React.Component { const GroupRoomList = sdk.getComponent('groups.GroupRoomList'); const GroupRoomInfo = sdk.getComponent('groups.GroupRoomInfo'); - const TintableSvg = sdk.getComponent("elements.TintableSvg"); - - const isPhaseGroup = [ - RightPanel.Phase.GroupMemberInfo, - RightPanel.Phase.GroupMemberList, - ].includes(this.state.phase); - let panel =
; if (this.props.roomId && this.state.phase === RightPanel.Phase.RoomMemberList) { diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index a71fbe2540..46653f1599 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -17,11 +17,13 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; import sdk from '../../../index'; +import dis from '../../../dispatcher'; import GroupStore from '../../../stores/GroupStore'; import PropTypes from 'prop-types'; import { showGroupInviteDialog } from '../../../GroupAddressPicker'; import AccessibleButton from '../elements/AccessibleButton'; import TintableSvg from '../elements/TintableSvg'; +import RightPanel from '../../structures/RightPanel'; const INITIAL_LOAD_NUM_MEMBERS = 30; @@ -175,7 +177,11 @@ export default React.createClass({ let inviteButton; if (GroupStore.isUserPrivileged(this.props.groupId)) { - inviteButton = ( + inviteButton = ( +
@@ -184,9 +190,6 @@ export default React.createClass({ } return ( - - -
{ inviteButton } diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index 4329410092..81fcfa8c8b 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -131,12 +131,17 @@ export default React.createClass({ let inviteButton; if (GroupStore.isUserPrivileged(this.props.groupId)) { - inviteButton = ( + inviteButton = ( +
{ _t('Add rooms to this community') }
-
); +
+ ); } const inputBox = (