swarm-ui: an agent icon loads when it scrolls into view
Every card fetched its icon on page load, so a roster of 80 made 80 requests before the first scroll. The image is lazy now; the first screen's still load at once.
This commit is contained in:
parent
c1d182daa0
commit
7ae1b42fd9
1 changed files with 3 additions and 0 deletions
|
|
@ -27,6 +27,9 @@ export function AgentIcon({
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
alt=""
|
alt=""
|
||||||
|
// A long roster draws its icons as they scroll into view, not all at once.
|
||||||
|
loading="lazy"
|
||||||
|
decoding="async"
|
||||||
src={
|
src={
|
||||||
fallback
|
fallback
|
||||||
? "/agent-default.svg"
|
? "/agent-default.svg"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue