import { Button } from '@/components/ui/button' import { getFollowPackInfoFromEvent } from '@/lib/event-metadata' import { toFollowPack } from '@/lib/link' import { useSecondaryPage } from '@/PageManager' import { Event } from 'nostr-tools' import { useMemo } from 'react' import { useTranslation } from 'react-i18next' import Image from '../Image' export default function FollowPack({ event, className }: { event: Event; className?: string }) { const { t } = useTranslation() const { push } = useSecondaryPage() const { title, description, image, pubkeys } = useMemo( () => getFollowPackInfoFromEvent(event), [event] ) const handleViewDetails = (e: React.MouseEvent) => { e.stopPropagation() push(toFollowPack(event)) } return (
{image && ( )}

{title}

{t('n users', { count: pubkeys.length })}
{description && (

{description}

)}
) }