diff --git a/src/components/FigmaBanner.tsx b/src/components/FigmaBanner.tsx index cf4669b..2cecf88 100644 --- a/src/components/FigmaBanner.tsx +++ b/src/components/FigmaBanner.tsx @@ -277,34 +277,49 @@ export function FigmaBanner() { if (slides.length === 0) return null; + // Cap the dot indicator at 10 so a long banner list never overflows the phone + // width. With more slides we show a 10-dot window that follows the active + // slide; each dot still maps to its real slide index. + const maxDots = 10; + const dotWindowStart = + slides.length <= maxDots + ? 0 + : Math.min( + Math.max(activeIndex - Math.floor(maxDots / 2), 0), + slides.length - maxDots, + ); + const pagination = hasMultiple ? (
- {slides.map((slide, index) => { - const active = index === activeIndex; - return ( -
) : null;