import React from 'react'; import { UserType } from './Types'; import Avatar from './Avatar'; const Contact = React.memo(({user, ...rest}) => { return ( <> {user.unreadCount && {user.unreadCount}}
{user.lastMessageText}
); }); export default Contact; Contact.propTypes = { user: UserType };