import React from 'react'; import { ConversationListItemWithDetails } from '../ConversationListItem'; import { RowRendererParamsType } from '../LeftPane'; import { AutoSizer, List } from 'react-virtualized'; import { ConversationType as ReduxConversationType } from '../../state/ducks/conversations'; import { DefaultTheme } from 'styled-components'; import { LeftPaneSectionHeader } from './LeftPaneSectionHeader'; import autoBind from 'auto-bind'; export interface Props { directContacts: Array; theme: DefaultTheme; openConversationExternal: (id: string, messageId?: string) => void; } export class LeftPaneContactSection extends React.Component { public constructor(props: Props) { super(props); autoBind(this); } public renderHeader(): JSX.Element | undefined { return ; } public render(): JSX.Element { return (
{this.renderHeader()} {this.renderContacts()}
); } public renderRow = ({ index, key, style }: RowRendererParamsType): JSX.Element | undefined => { const { directContacts } = this.props; const item = directContacts[index]; return ( ); }; private renderContacts() { return
{this.renderList()}
; } private renderList() { const { directContacts } = this.props; const length = Number(directContacts.length); const list = (
{({ height, width }) => ( )}
); return [list]; } }