
setLoaded(true)}
className={`h-full w-full object-contain transition-opacity ${
loaded ? "opacity-100" : "opacity-0"
}`}
/>
);
}
```
## 7. Error fallback with the first letter
If the API can't find a logo for a domain, render a deterministic letter avatar instead.
```tsx
function LogoOrFallback({ domain, name }: { domain: string; name: string }) {
const [errored, setErrored] = useState(false);
if (errored) {
return (