import type { FC } from 'react'; import { Avatar } from 'antd'; import type { AvatarProps } from 'antd'; import avatarIcon from './assets/avatar.gif'; interface Props extends AvatarProps { staffName?: string; avatarImg?: string; } const { tmeAvatarUrl } = process.env; const TMEAvatar: FC = ({ staffName, avatarImg, ...restProps }) => { const avatarSrc = tmeAvatarUrl ? `${tmeAvatarUrl}${staffName}.png` : avatarImg; return ( } {...restProps} /> ); }; export default TMEAvatar;