import UserAvatar from '@/components/UserAvatar' import { Button } from '@/components/ui/button' import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from '@/components/ui/sheet' import { getProfileFromEvent } from '@/lib/event-metadata' import { cn } from '@/lib/utils' import { toProfile } from '@/lib/link' import { collectAggregatedNip05sFromKind0, truncateAbout } from '@/lib/relay-pulse-nip05' import { useMuteList } from '@/contexts/mute-list-context' import { useFavoriteRelaysActivity } from '@/providers/favorite-relays-activity-context' import { SecondaryPageLink } from '@/PageManager' import type { Event } from 'nostr-tools' import { Users } from 'lucide-react' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' const ABOUT_PREVIEW_LEN = 250 function CompactProfileCard({ event }: { event: Event }) { const profile = getProfileFromEvent(event) const nip05s = collectAggregatedNip05sFromKind0(event) const about = truncateAbout(profile.about, ABOUT_PREVIEW_LEN) return (
{about}
) : null} {nip05s.length > 0 ? ({t('Loading...')}
) : null}{t('Relay pulse drawer no profiles')}
) : null}