diff --git a/ts/components/LeftPane.tsx b/ts/components/LeftPane.tsx index 6bd84503d..51c787dfa 100644 --- a/ts/components/LeftPane.tsx +++ b/ts/components/LeftPane.tsx @@ -45,6 +45,7 @@ interface Props { sentFriendsRequest: Array; receivedFriendsRequest: Array; unreadMessageCount: number; + receivedFriendRequestCount: number; searchResults?: SearchResultsProps; searchTerm: string; isSecondaryDevice: boolean; @@ -171,7 +172,7 @@ export class LeftPane extends React.Component { selectedSection={this.state.selectedSection} onSectionSelected={this.handleSectionSelected} conversations={this.props.conversations} - receivedFriendsRequest={this.props.receivedFriendsRequest} + receivedFriendRequestCount={this.props.receivedFriendRequestCount} unreadMessageCount={this.props.unreadMessageCount} />
{this.renderSection()}
diff --git a/ts/components/session/ActionsPanel.tsx b/ts/components/session/ActionsPanel.tsx index 485e69e1d..93d4be53a 100644 --- a/ts/components/session/ActionsPanel.tsx +++ b/ts/components/session/ActionsPanel.tsx @@ -20,8 +20,8 @@ interface Props { onSectionSelected: any; selectedSection: SectionType; conversations: Array | undefined; - receivedFriendsRequest: Array; unreadMessageCount: number; + receivedFriendRequestCount: number; } const Section = ({ @@ -140,12 +140,10 @@ export class ActionsPanel extends React.Component { public render(): JSX.Element { const { selectedSection, - receivedFriendsRequest, unreadMessageCount, + receivedFriendRequestCount, } = this.props; - const friendRequestCount = receivedFriendsRequest.length; - const isProfilePageSelected = selectedSection === SectionType.Profile; const isMessagePageSelected = selectedSection === SectionType.Message; const isContactPageSelected = selectedSection === SectionType.Contact; @@ -171,7 +169,7 @@ export class ActionsPanel extends React.Component { type={SectionType.Contact} isSelected={isContactPageSelected} onSelect={this.handleSectionSelect} - notificationCount={friendRequestCount} + notificationCount={receivedFriendRequestCount} />