Browse Source

feat: improve nip05 favicon loading and display effect

imwald
codytseng 8 months ago
parent
commit
03deb9d375
  1. 2
      src/components/Favicon/index.tsx
  2. 2
      src/components/Nip05/index.tsx

2
src/components/Favicon/index.tsx

@ -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)}
/> />

2
src/components/Nip05/index.tsx

@ -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" />}
/> />
) : ( ) : (

Loading…
Cancel
Save