import { User } from 'icons'
import { ReactNode, useState } from 'react'
import { cn } from 'ui'
interface ProfileImageProps {
alt?: string
src?: string
placeholder?: ReactNode
className?: string
}
export const ProfileImage = ({ alt, src, placeholder, className }: ProfileImageProps) => {
const [hasInvalidImg, setHasInvalidImg] = useState(false)
return !!src && !hasInvalidImg ? (
setHasInvalidImg(true)}
/>
) : (
(placeholder ?? (
))
)
}