diff --git a/src/components/FigmaBanner.tsx b/src/components/FigmaBanner.tsx index 64e3921..e769f3c 100644 --- a/src/components/FigmaBanner.tsx +++ b/src/components/FigmaBanner.tsx @@ -40,6 +40,8 @@ type BannerApiResponse = { const AUTOPLAY_MS = 3000; const RESUME_AFTER_INTERACTION_MS = 8000; +// Product rule: show at most 10 banners, so the dot row always fits one line. +const MAX_BANNERS = 10; const publicMenuOpenChangeEvent = "ark:public-menu-open-change"; function bannerLangParam(lang: Lang): string { @@ -82,6 +84,7 @@ function toSlides(items: BannerApiItem[]): BannerSlide[] { return [...items] .sort((a, b) => (a.sortOrder ?? 0) - (b.sortOrder ?? 0)) .filter((item) => item.imageUrl) + .slice(0, MAX_BANNERS) .map((item) => { const imageUrl = assetUrl(item.imageUrl); return { @@ -292,12 +295,11 @@ export function FigmaBanner() { if (slides.length === 0) return null; - // Show every slide's dot. The row stays within the screen width and wraps to - // a second row (and beyond if needed) instead of overflowing horizontally. + // At most MAX_BANNERS slides, so the dots always fit on a single centered row. const pagination = hasMultiple ? (