'use client' import { FC } from 'react'; import { LazyLoadImage } from 'react-lazy-load-image-component'; import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle, DialogTrigger } from './ui/dialog'; import { cn } from '@/lib/utils'; type Props = { avatar: string | null; // Allow null to handle fallback logic safely className?: string; isPresence?: boolean; // sizes and quality are removed as they are specific to Next/Image server processing }; const ViewAvatar: FC = ({ avatar, className, isPresence }) => { return ( <> {avatar ? ( {/* 1. TRIGGER IMAGE Removed the wrapper div. Applied classes directly to LazyLoadImage. Added `block` to wrapperClassName to prevent extra inline spacing. */} Profile Description of profile avatar {/* 2. DIALOG CONTENT IMAGE Logic for Presence vs Standard is much simpler now. Standard CSS handles the width/height. */} ) : ( // 3. FALLBACK IMAGE )} ); } export const Avatar: FC = ({ avatar, className }) => { return ( <> {avatar ? ( ) : ( )} ); } export default ViewAvatar;