diff --git a/ts/components/LeftPane.tsx b/ts/components/LeftPane.tsx index 49e1c5f85..009e75f5b 100644 --- a/ts/components/LeftPane.tsx +++ b/ts/components/LeftPane.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { LeftPaneSections, SectionType } from './session/LeftPaneSections'; +import { ActionsPanel, SectionType } from './session/ActionsPanel'; import { LeftPaneMessageSection } from './session/LeftPaneMessageSection'; import { PropsData as ConversationListItemPropsType } from './ConversationListItem'; @@ -40,7 +40,7 @@ export class LeftPane extends React.Component { public render(): JSX.Element { return (
- diff --git a/ts/components/session/LeftPaneSections.tsx b/ts/components/session/ActionsPanel.tsx similarity index 83% rename from ts/components/session/LeftPaneSections.tsx rename to ts/components/session/ActionsPanel.tsx index 473373de0..beaf0b1eb 100644 --- a/ts/components/session/LeftPaneSections.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -112,7 +112,7 @@ const Section = ({ } }; -export class LeftPaneSections extends React.Component { +export class ActionsPanel extends React.Component { constructor(props: Props) { super(props); this.state = { @@ -133,48 +133,40 @@ export class LeftPaneSections extends React.Component { } public render(): JSX.Element { - const isProfileSelected = - this.props.selectedSection === SectionType.Profile; - const isMessageSelected = - this.props.selectedSection === SectionType.Message; - const isPeopleSelected = this.props.selectedSection === SectionType.People; - const isGlobeSelected = this.props.selectedSection === SectionType.Globe; - const isSettingsSelected = - this.props.selectedSection === SectionType.Settings; - const isMoonSelected = this.props.selectedSection === SectionType.Moon; + const { selectedSection } = this.props; return (
diff --git a/ts/components/session/LeftPaneMessageSection.tsx b/ts/components/session/LeftPaneMessageSection.tsx index 74dc49478..5306a3ed6 100644 --- a/ts/components/session/LeftPaneMessageSection.tsx +++ b/ts/components/session/LeftPaneMessageSection.tsx @@ -185,13 +185,11 @@ export class LeftPaneMessageSection extends React.Component { public render(): JSX.Element { return ( -
-
- {this.renderHeader()} - {this.state.showComposeView - ? this.renderCompose() - : this.renderConversations()} -
+
+ {this.renderHeader()} + {this.state.showComposeView + ? this.renderCompose() + : this.renderConversations()}
); }