import React from 'react'; import PropTypes from 'prop-types'; import { Link } from 'react-router-dom'; import { UserType } from './Types'; const Avatar = React.memo(function AvatarComponent(props) { return (
{`${props.user.uname}`}
{props.user.uname} {props.children}
); }); export default Avatar; Avatar.propTypes = { user: UserType, link: PropTypes.string, children: PropTypes.node };