import React from 'react'; import Avatar from './Avatar'; /** * @typedef {Object} ContactProps * @property {import('../api').Chat} user * @property {React.CSSProperties} style */ /** * Contact component * @param {ContactProps} props */ function Contact({ user, style }) { return ( {user.unreadCount && {user.unreadCount}}
{user.lastMessageText}
); } export default React.memo(Contact);