import Logo from '@/assets/images/logo.png'; import { Avatar as MuiAvatar, SxProps } from '@mui/material'; import { IconDandulogo } from '@panda-wiki/icons'; import { ReactNode } from 'react'; interface AvatarProps { src?: string; className?: string; sx?: SxProps; errorIcon?: ReactNode; errorImg?: ReactNode; } const Avatar = (props: AvatarProps) => { const src = props.src; const LogoIcon = ( ); const errorNode = props.errorIcon || props.errorImg || LogoIcon; if (props.errorIcon || props.errorImg) { return ( {errorNode} ); } return ( {errorNode} ); }; export default Avatar;