import { FALLBACK_IMAGE } from '../../constants'; import { Profile } from '../../interfaces/profile'; import { skeleton } from '../../utils'; import LazyImage from '../lazy-image'; interface AvatarCardProps { profile: Profile | null; loading: boolean; avatarRing: boolean; resumeFileUrl?: string; } /** * Renders an AvatarCard component. * @param profile - The profile object. * @param loading - A boolean indicating if the profile is loading. * @param avatarRing - A boolean indicating if the avatar should have a ring. * @param resumeFileUrl - The URL of the resume file. * @returns JSX element representing the AvatarCard. */ const AvatarCard: React.FC = ({ profile, loading, avatarRing, resumeFileUrl, }): React.JSX.Element => { return (
{loading || !profile ? (
{skeleton({ widthCls: 'w-full', heightCls: 'h-full', shape: '', })}
) : (
{ }
)}
{loading || !profile ? ( skeleton({ widthCls: 'w-48', heightCls: 'h-8' }) ) : ( {profile.name} )}
{loading || !profile ? skeleton({ widthCls: 'w-48', heightCls: 'h-5' }) : profile.bio}
{resumeFileUrl && (loading ? (
{skeleton({ widthCls: 'w-40', heightCls: 'h-8' })}
) : ( Download Resume ))}
); }; export default AvatarCard;