diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 69ea3bb..85e8c56 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -453,15 +453,31 @@ function QuickLinksCarousel({ links }) { } function QuickLinkIcon({ l }) { + const [imgOk, setImgOk] = useState(true); + + // Favicon-URL bauen: gespeicherten Wert nehmen oder aus URL ableiten + const faviconUrl = (() => { + if (l.icon && l.icon.startsWith('http')) return l.icon; + try { + const host = new URL(l.url).hostname; + return `https://www.google.com/s2/favicons?sz=64&domain=${host}`; + } catch { return null; } + })(); + + const showEmoji = !faviconUrl || !imgOk; + const fallbackEmoji = l.icon && !l.icon.startsWith('http') ? l.icon : '🔗'; + return ( - {l.icon && l.icon.startsWith('http') - ? e.target.style.display='none'}/> - : {l.icon}} + {!showEmoji + ? setImgOk(false)}/> + : {fallbackEmoji} + } {l.title}