import { memo } from 'react'; import { Link } from 'react-router-dom'; import Icon from './Icon'; import './Avatar.css'; /** * @typedef {Object} AvatarProps * @property {import('../api').User} user * @property {React.CSSProperties=} style * @property {string=} link * @property {React.ReactNode=} children */ /** * Avatar component * @param {AvatarProps} props */ function Avatar({ user, style, link, children }) { return (
{ user.uname ? {user.avatar ? {`${user.uname}`} : } : }
{user.uname} {children}
); } export default memo(Avatar);