diff --git a/src/components/views/avatars/BaseAvatar.tsx b/src/components/views/avatars/BaseAvatar.tsx index e51016d7c5..01cbb9137f 100644 --- a/src/components/views/avatars/BaseAvatar.tsx +++ b/src/components/views/avatars/BaseAvatar.tsx @@ -93,10 +93,10 @@ const BaseAvatar = (props: IProps) => { title, url, urls, - width=40, - height=40, - resizeMethod="crop", // eslint-disable-line no-unused-vars - defaultToInitialLetter=true, + width = 40, + height = 40, + resizeMethod = "crop", // eslint-disable-line no-unused-vars + defaultToInitialLetter = true, onClick, inputRef, ...otherProps @@ -133,7 +133,7 @@ const BaseAvatar = (props: IProps) => { aria-hidden="true" /> ); - if (onClick != null) { + if (onClick !== null) { return ( { } } - if (onClick != null) { + if (onClick !== null) { return ( { diff --git a/src/components/views/avatars/MemberAvatar.tsx b/src/components/views/avatars/MemberAvatar.tsx index 505fbaa691..1d23d85b0f 100644 --- a/src/components/views/avatars/MemberAvatar.tsx +++ b/src/components/views/avatars/MemberAvatar.tsx @@ -52,7 +52,7 @@ export default class MemberAvatar extends React.Component { constructor(props: IProps) { super(props); - this.state = MemberAvatar.getState(props) + this.state = MemberAvatar.getState(props); } public static getDerivedStateFromProps(nextProps: IProps): IState { diff --git a/src/components/views/avatars/PulsedAvatar.tsx b/src/components/views/avatars/PulsedAvatar.tsx index 578afeb9a1..94a6c87687 100644 --- a/src/components/views/avatars/PulsedAvatar.tsx +++ b/src/components/views/avatars/PulsedAvatar.tsx @@ -22,7 +22,7 @@ interface IProps { const PulsedAvatar: React.FC = (props) => { return
{props.children} -
-} + ; +}; export default PulsedAvatar; \ No newline at end of file diff --git a/src/components/views/avatars/RoomAvatar.tsx b/src/components/views/avatars/RoomAvatar.tsx index c5620a9aa0..0947157652 100644 --- a/src/components/views/avatars/RoomAvatar.tsx +++ b/src/components/views/avatars/RoomAvatar.tsx @@ -53,7 +53,7 @@ export default class RoomAvatar extends React.Component { this.state = { urls: RoomAvatar.getImageUrls(this.props), - } + }; } public componentDidMount() { @@ -83,7 +83,7 @@ export default class RoomAvatar extends React.Component { this.setState({ urls: RoomAvatar.getImageUrls(this.props), }); - } + }; private static getImageUrls(props: IProps): string[] { return [ @@ -98,7 +98,7 @@ export default class RoomAvatar extends React.Component { ), // highest priority RoomAvatar.getRoomAvatarUrl(props), ].filter(function(url) { - return (url != null && url != ""); + return (url !== null && url !== ""); }); } @@ -123,7 +123,7 @@ export default class RoomAvatar extends React.Component { }; Modal.createDialog(ImageView, params, "mx_Dialog_lightbox"); - } + }; public render() { /*eslint no-unused-vars: ["error", { "ignoreRestSiblings": true }]*/ diff --git a/src/components/views/voip/CallContainer.tsx b/src/components/views/voip/CallContainer.tsx index 684cc0acb9..0e901fac7d 100644 --- a/src/components/views/voip/CallContainer.tsx +++ b/src/components/views/voip/CallContainer.tsx @@ -32,6 +32,6 @@ export default class CallContainer extends React.PureComponent { return
-
+ ; } } \ No newline at end of file diff --git a/src/components/views/voip/CallPreview2.tsx b/src/components/views/voip/CallPreview2.tsx index ec4956fb9a..1f2caf5ef8 100644 --- a/src/components/views/voip/CallPreview2.tsx +++ b/src/components/views/voip/CallPreview2.tsx @@ -69,7 +69,7 @@ export default class CallPreview extends React.Component { this.roomStoreToken.remove(); } dis.unregister(this.dispatcherRef); - SettingsStore.unwatchSetting(this.settingsWatcherRef) + SettingsStore.unwatchSetting(this.settingsWatcherRef); } private onRoomViewStoreUpdate = (payload) => { @@ -77,7 +77,7 @@ export default class CallPreview extends React.Component { this.setState({ roomId: RoomViewStore.getRoomId(), }); - } + }; private onAction = (payload: ActionPayload) => { switch (payload.action) { @@ -89,7 +89,7 @@ export default class CallPreview extends React.Component { }); break; } - } + }; private onCallViewClick = () => { const call = CallHandler.getAnyActiveCall(); @@ -99,13 +99,13 @@ export default class CallPreview extends React.Component { room_id: call.groupRoomId || call.roomId, }); } - } + }; public render() { if (this.state.newRoomListActive) { const callForRoom = CallHandler.getCallForRoom(this.state.roomId); const showCall = ( - this.state.activeCall && + this.state.activeCall && this.state.activeCall.call_state === 'connected' && !callForRoom ); diff --git a/src/components/views/voip/CallView2.tsx b/src/components/views/voip/CallView2.tsx index d40e9e9056..c80d82d395 100644 --- a/src/components/views/voip/CallView2.tsx +++ b/src/components/views/voip/CallView2.tsx @@ -31,29 +31,28 @@ import PulsedAvatar from '../avatars/PulsedAvatar'; interface IProps { // js-sdk room object. If set, we will only show calls for the given // room; if not, we will show any active call. - room?: Room, + room?: Room; // A Conference Handler implementation // Must have a function signature: // getConferenceCallForRoom(roomId: string): MatrixCall - ConferenceHandler?: any, + ConferenceHandler?: any; // maxHeight style attribute for the video panel - maxVideoHeight?: number, + maxVideoHeight?: number; // a callback which is called when the user clicks on the video div - onClick?: React.MouseEventHandler, + onClick?: React.MouseEventHandler; // a callback which is called when the content in the callview changes // in a way that is likely to cause a resize. - onResize?: any, + onResize?: any; // classname applied to view, - className?: string, + className?: string; // Whether to show the hang up icon:W - showHangup?: boolean, - + showHangup?: boolean; } interface IState { @@ -71,7 +70,7 @@ export default class CallView extends React.Component { this.state = { // the call this view is displaying (if any) call: null, - } + }; this.videoref = createRef(); } @@ -92,7 +91,7 @@ export default class CallView extends React.Component { return; } this.showCall(); - } + }; private showCall() { let call; @@ -154,7 +153,7 @@ export default class CallView extends React.Component { public render() { let view: React.ReactNode; if (this.state.call && this.state.call.type === "voice") { - const client = MatrixClientPeg.get() + const client = MatrixClientPeg.get(); const callRoom = client.getRoom(this.state.call.roomId); view = @@ -189,7 +188,7 @@ export default class CallView extends React.Component { room_id: this.state.call.roomId, }); }} - /> + />; } return
diff --git a/src/components/views/voip/IncomingCallBox2.tsx b/src/components/views/voip/IncomingCallBox2.tsx index cd90581b70..6dfcb4bcee 100644 --- a/src/components/views/voip/IncomingCallBox2.tsx +++ b/src/components/views/voip/IncomingCallBox2.tsx @@ -41,10 +41,10 @@ export default class IncomingCallBox2 extends React.Component { constructor(props: IProps) { super(props); - this.dispatcherRef = dis.register(this.onAction) + this.dispatcherRef = dis.register(this.onAction); this.state = { incomingCall: null, - } + }; } public componentWillUnmount() { @@ -54,7 +54,7 @@ export default class IncomingCallBox2 extends React.Component { private onAction = (payload: ActionPayload) => { switch (payload.action) { case 'call_state': - var call = CallHandler.getCall(payload.room_id); + const call = CallHandler.getCall(payload.room_id); if (call && call.call_state === 'ringing') { this.setState({ incomingCall: call, @@ -65,7 +65,7 @@ export default class IncomingCallBox2 extends React.Component { }); } } - } + }; private onAnswerClick: React.MouseEventHandler = (e) => { e.stopPropagation(); @@ -73,7 +73,7 @@ export default class IncomingCallBox2 extends React.Component { action: 'answer', room_id: this.state.incomingCall.roomId, }); - } + }; private onRejectClick: React.MouseEventHandler = (e) => { e.stopPropagation(); @@ -81,7 +81,7 @@ export default class IncomingCallBox2 extends React.Component { action: 'hangup', room_id: this.state.incomingCall.roomId, }); - } + }; public render() { if (!this.state.incomingCall) {