import React from 'react'; import PropTypes from 'prop-types'; import Avatar from '../Avatar'; import styles from './styles'; const MessageAvatar = React.memo(({ isHeader, avatar, author, baseUrl, user, small }) => { if (isHeader) { return ( ); } return null; }, (prevProps, nextProps) => prevProps.isHeader === nextProps.isHeader); MessageAvatar.propTypes = { isHeader: PropTypes.bool, avatar: PropTypes.string, author: PropTypes.obj, baseUrl: PropTypes.string, user: PropTypes.obj, small: PropTypes.bool }; MessageAvatar.displayName = 'MessageAvatar'; export default MessageAvatar;