diff --git a/src/components/structures/AutoHideScrollbar.js b/src/components/structures/AutoHideScrollbar.js index 66c3b0d6e1..507af2c5f0 100644 --- a/src/components/structures/AutoHideScrollbar.js +++ b/src/components/structures/AutoHideScrollbar.js @@ -19,20 +19,20 @@ import React from "react"; // derived from code from github.com/noeldelgado/gemini-scrollbar // Copyright (c) Noel Delgado (pixelia.me) function getScrollbarWidth(alternativeOverflow) { - var e = document.createElement('div'), sw; - e.style.position = 'absolute'; - e.style.top = '-9999px'; - e.style.width = '100px'; - e.style.height = '100px'; - e.style.overflow = "scroll"; + const div = document.createElement('div'); + div.style.position = 'absolute'; + div.style.top = '-9999px'; + div.style.width = '100px'; + div.style.height = '100px'; + div.style.overflow = "scroll"; if (alternativeOverflow) { - e.style.overflow = alternativeOverflow; + div.style.overflow = alternativeOverflow; } - e.style.msOverflowStyle = '-ms-autohiding-scrollbar'; - document.body.appendChild(e); - sw = (e.offsetWidth - e.clientWidth); - document.body.removeChild(e); - return sw; + div.style.msOverflowStyle = '-ms-autohiding-scrollbar'; + document.body.appendChild(div); + const scrollbarWidth = (div.offsetWidth - div.clientWidth); + document.body.removeChild(div); + return scrollbarWidth; } function install() { @@ -60,11 +60,10 @@ const installBodyClassesIfNeeded = (function() { install(); installed = true; } - } + }; })(); export default class AutoHideScrollbar extends React.Component { - constructor(props) { super(props); this.onOverflow = this.onOverflow.bind(this); diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js index cd4c81bd2c..247b12dc88 100644 --- a/src/components/structures/LeftPanel.js +++ b/src/components/structures/LeftPanel.js @@ -179,10 +179,9 @@ const LeftPanel = React.createClass({ const RoomList = sdk.getComponent('rooms.RoomList'); const TagPanel = sdk.getComponent('structures.TagPanel'); const TopLeftMenuButton = sdk.getComponent('structures.TopLeftMenuButton'); - const BottomLeftMenu = sdk.getComponent('structures.BottomLeftMenu'); const CallPreview = sdk.getComponent('voip.CallPreview'); - let topBox = ; + const topBox = ; /* const SearchBox = sdk.getComponent('structures.SearchBox'); const topBox = ; diff --git a/src/components/structures/TopLeftMenuButton.js b/src/components/structures/TopLeftMenuButton.js index 71ca382e92..00e669acdd 100644 --- a/src/components/structures/TopLeftMenuButton.js +++ b/src/components/structures/TopLeftMenuButton.js @@ -26,7 +26,6 @@ import Avatar from '../../Avatar'; const AVATAR_SIZE = 28; export default class TopLeftMenuButton extends React.Component { - static propTypes = { collapsed: PropTypes.bool.isRequired, }; diff --git a/src/components/views/context_menus/TopLeftMenu.js b/src/components/views/context_menus/TopLeftMenu.js index ec3120cfea..76ac10399c 100644 --- a/src/components/views/context_menus/TopLeftMenu.js +++ b/src/components/views/context_menus/TopLeftMenu.js @@ -19,7 +19,6 @@ import dis from '../../../dispatcher'; import { _t } from '../../../languageHandler'; export class TopLeftMenu extends React.Component { - constructor() { super(); this.openSettings = this.openSettings.bind(this); diff --git a/src/resizer/distributors.js b/src/resizer/distributors.js index a81925a763..29e97e0bce 100644 --- a/src/resizer/distributors.js +++ b/src/resizer/distributors.js @@ -74,7 +74,6 @@ class CollapseDistributor extends FixedDistributor { } class PercentageDistributor { - constructor(sizer, item, _config, items, container) { this.container = container; this.totalSize = sizer.getTotalSize(); diff --git a/src/resizer/room.js b/src/resizer/room.js index a6ad0b5dc2..3d68d16f9b 100644 --- a/src/resizer/room.js +++ b/src/resizer/room.js @@ -34,7 +34,6 @@ class RoomSizer extends Sizer { item.style.maxHeight = `${Math.round(size)}px`; } } - } class RoomDistributor extends FixedDistributor {