feat: improve nip05 favicon loading and display effect
This commit is contained in:
@@ -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)}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -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" />}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user