import React from 'react'; import { UserType } from './Types'; import Avatar from './Avatar'; export default class Contact extends React.Component { render() { const { user } = this.props; return ( <> {user.unreadCount && {user.unreadCount}}
{user.lastMessageText}
); } } Contact.propTypes = { user: UserType };