diff --git a/client/src/components/Collab/CollabLinks.tsx b/client/src/components/Collab/CollabLinks.tsx index d1b4d694f..327aa5b60 100644 --- a/client/src/components/Collab/CollabLinks.tsx +++ b/client/src/components/Collab/CollabLinks.tsx @@ -25,13 +25,25 @@ interface CollabLink { pinned: boolean | number } +// The glyph holds the place until a favicon has really arrived: a host that never +// answers, or answers with a blank pixel, left the chip with an empty square. function LinkIcon({ url }: { url: string }) { - const [failed, setFailed] = useState(false) + const [state, setState] = useState<'loading' | 'loaded' | 'failed'>('loading') let favicon = '' try { favicon = new URL('/favicon.ico', url).href } catch { /* not a parseable url, fall through to the glyph */ } + const loaded = state === 'loaded' return ( )