feat: improve nip05 favicon loading and display effect

This commit is contained in:
codytseng
2025-07-14 21:51:19 +08:00
parent 069ac34b86
commit 03deb9d375
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ export function Favicon({
<img <img
src={`https://${domain}/favicon.ico`} src={`https://${domain}/favicon.ico`}
alt={domain} alt={domain}
className={cn('absolute inset-0', className)} className={cn('absolute inset-0', loading && 'opacity-0', className)}
onError={() => setError(true)} onError={() => setError(true)}
onLoad={() => setLoading(false)} onLoad={() => setLoading(false)}
/> />

View File

@@ -34,7 +34,7 @@ export default function Nip05({ pubkey, append }: { pubkey: string; append?: str
{nip05IsVerified ? ( {nip05IsVerified ? (
<Favicon <Favicon
domain={nip05Domain} domain={nip05Domain}
className="w-3.5 h-3.5" className="w-3.5 h-3.5 rounded-full"
fallback={<BadgeCheck className="text-primary" />} fallback={<BadgeCheck className="text-primary" />}
/> />
) : ( ) : (