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