import Link from "next/link"; import { HiOutlineMapPin, HiCheckBadge, HiOutlineUsers } from "react-icons/hi2"; import { Avatar, AvatarImage, AvatarFallback } from "@/components/ui/avatar"; import useProfile from "@/lib/hooks/useProfile"; import { getTwoLetters, getNameToShow } from "@/lib/utils"; import { nip19 } from "nostr-tools"; export default function UserRow({ pubkey }: { pubkey: string }) { const npub = nip19.npubEncode(pubkey); const { profile } = useProfile(pubkey); return (
  • {getTwoLetters({ npub, profile })} {profile?.displayName || profile?.name ? (
    {getNameToShow({ npub, profile })} {!!profile?.nip05 && ( )}
    {!!profile.nip05 && ( {profile.nip05} )}
    ) : (
    {getNameToShow({ npub, profile })} {!!profile?.nip05 && ( )}
    )}
  • ); }