import React, { Component } from 'react'; import styles from './styles.scss'; import { Link } from 'react-router'; import { withRouter } from 'react-router'; import { FormattedMessage } from 'react-intl'; import UserListItem from './user-list-item/component.jsx'; import ChatListItem from './chat-list-item/component.jsx'; class UserList extends Component { constructor(props) { super(props); this.handleMessageClick = this.handleMessageClick.bind(this); this.handleParticipantDblClick = this.handleParticipantDblClick.bind(this); } handleMessageClick(chatID) { this.props.router.push(`/users/chat/${chatID}`); } handleParticipantDblClick(userID) { this.props.router.push(`/users/chat/${userID}`); } render() { return (
{this.renderHeader()} {this.renderContent()}
); } renderHeader() { return (

); } renderContent() { return (
{this.renderMessages()} {this.renderParticipants()}
); } renderMessages() { return (

); } renderParticipants() { return (

 ({this.props.users.length})

); } } export default withRouter(UserList);