fixed errors in leftpanel.tsx

This commit is contained in:
Arsh Sharma 2020-10-13 17:04:39 +05:30
parent f5a40eff4b
commit 357579d6ba

View file

@ -17,7 +17,7 @@ limitations under the License.
import * as React from "react"; import * as React from "react";
import { createRef } from "react"; import { createRef } from "react";
import GroupFilterPanel from "./GroupFilterPanel"; import GroupFilterPanel from "./GroupFilterPanel";
import CustomRoomGroupFilterPanel from "./CustomRoomGroupFilterPanel"; import CustomRoomTagPanel from "./CustomRoomTagPanel";
import classNames from "classnames"; import classNames from "classnames";
import dis from "../../dispatcher/dispatcher"; import dis from "../../dispatcher/dispatcher";
import { _t } from "../../languageHandler"; import { _t } from "../../languageHandler";
@ -78,7 +78,8 @@ export default class LeftPanel extends React.Component<IProps, IState> {
OwnProfileStore.instance.on(UPDATE_EVENT, this.onBackgroundImageUpdate); OwnProfileStore.instance.on(UPDATE_EVENT, this.onBackgroundImageUpdate);
this.bgImageWatcherRef = SettingsStore.watchSetting( this.bgImageWatcherRef = SettingsStore.watchSetting(
"RoomList.backgroundImage", null, this.onBackgroundImageUpdate); "RoomList.backgroundImage", null, this.onBackgroundImageUpdate);
this.GroupFilterPanelWatcherRef = SettingsStore.watchSetting("GroupFilterPanel.enableGroupFilterPanel", null, () => { this.GroupFilterPanelWatcherRef = SettingsStore.watchSetting("GroupFilterPanel.enableGroupFilterPanel", null,
() => {
this.setState({showGroupFilterPanel: SettingsStore.getValue("GroupFilterPanel.enableGroupFilterPanel")}); this.setState({showGroupFilterPanel: SettingsStore.getValue("GroupFilterPanel.enableGroupFilterPanel")});
}); });
@ -375,10 +376,10 @@ export default class LeftPanel extends React.Component<IProps, IState> {
} }
public render(): React.ReactNode { public render(): React.ReactNode {
const GroupFilterPanel = !this.state.showGroupFilterPanel ? null : ( const groupFilterPanel = !this.state.showGroupFilterPanel ? null : (
<div className="mx_LeftPanel_GroupFilterPanelContainer"> <div className="mx_LeftPanel_GroupFilterPanelContainer">
<GroupFilterPanel /> <GroupFilterPanel />
{SettingsStore.getValue("feature_custom_tags") ? <CustomRoomGroupFilterPanel /> : null} {SettingsStore.getValue("feature_custom_tags") ? <CustomRoomTagPanel /> : null}
</div> </div>
); );