import { Skeleton } from '@/components/ui/skeleton' import { useFetchProfile } from '@/hooks' import { useFetchNip05 } from '@/hooks/useFetchNip05' import { toNoteList } from '@/lib/link' import { SecondaryPageLink } from '@/PageManager' import { BadgeAlert, BadgeCheck } from 'lucide-react' import { Favicon } from '../Favicon' export default function Nip05({ pubkey, append }: { pubkey: string; append?: string }) { const { profile } = useFetchProfile(pubkey) const { nip05IsVerified, nip05Name, nip05Domain, isFetching } = useFetchNip05( profile?.nip05, pubkey ) if (isFetching) { return (
) } if (!profile?.nip05 || !nip05Name || !nip05Domain) return null return (
e.stopPropagation()} > {nip05Name !== '_' ? ( @{nip05Name} ) : null} {nip05IsVerified ? ( } /> ) : ( )} {nip05Domain} {append && {append}}
) }