import React from 'react'; import PropTypes from 'prop-types'; import { UserType } from './Types'; import Avatar from './Avatar'; function Contact({ user, style, ...rest }) { return ( {user.unreadCount && {user.unreadCount}}
{user.lastMessageText}
); } export default React.memo(Contact); Contact.propTypes = { user: UserType, style: PropTypes.object };