import { Skeleton } from '@/components/ui/skeleton' import { useFetchProfile } from '@/hooks' import { generateImageByPubkey } from '@/lib/pubkey' import { useMemo } from 'react' import ImageWithLightbox from '../ImageWithLightbox' export default function AvatarWithLightbox({ userId }: { userId: string }) { const { profile } = useFetchProfile(userId) const defaultAvatar = useMemo( () => (profile?.pubkey ? generateImageByPubkey(profile.pubkey) : ''), [profile] ) if (!profile) { return ( ) } const { avatar, pubkey } = profile || {} return ( ) }