feat: nip05 feeds
This commit is contained in:
15
src/components/Favicon/index.tsx
Normal file
15
src/components/Favicon/index.tsx
Normal file
@@ -0,0 +1,15 @@
|
||||
import { useState } from 'react'
|
||||
|
||||
export function Favicon({ domain, className }: { domain: string; className?: string }) {
|
||||
const [error, setError] = useState(false)
|
||||
if (error) return null
|
||||
|
||||
return (
|
||||
<img
|
||||
src={`https://${domain}/favicon.ico`}
|
||||
alt={domain}
|
||||
className={className}
|
||||
onError={() => setError(true)}
|
||||
/>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user