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