import type { NostrProfile } from '@/types/nostr' import { UserProfileHeader } from './UserProfileHeader' interface UserProfileProps { profile: NostrProfile pubkey: string articleCount?: number } function ProfileStats({ articleCount }: { articleCount: number }) { return (
{articleCount}
Article{articleCount !== 1 ? 's' : ''}
) } export function UserProfile({ profile, pubkey, articleCount }: UserProfileProps) { const displayName = profile.name ?? `${pubkey.slice(0, 16)}...` const displayPubkey = `${pubkey.slice(0, 8)}...${pubkey.slice(-8)}` return (
{profile.about &&

{profile.about}

} {articleCount !== undefined && }
) }