{visibleMembers.map((m, i) => {
// Skip the overflow slot when rendering visible tiles in the
// overflow case — only relevant when overflow > 0 and i would
// collide with overflowSlot. With visibleCount=3 and overflowSlot=2
// (bottom), this never collides because i ∈ {0,1,2} maps to
// slotIndex ∈ {0,1,3} — see assignment below.
const slotIndex = overflow > 0 && i >= overflowSlot ? i + 1 : i;
const pos = positions[slotIndex]!;
return (
);
})}
{overflow > 0 && (
{`+${overflow}`}
)}
);
}