From 901d69965f215dc70b03ef83e51c156c909a1039 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 28 Feb 2026 22:00:26 +0000 Subject: [PATCH] Limit carousel to display a maximum of nine articles Limit the featured carousel component to display a maximum of 9 articles by adjusting the calculation of total pages. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 517dfa7b-26ac-463d-a6e1-a58c6df97188 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 8540f9f1-6f09-452c-b0ec-6b5b0821231b Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/517dfa7b-26ac-463d-a6e1-a58c6df97188/0ZGabQy Replit-Helium-Checkpoint-Created: true --- client/src/pages/home.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 136aeb8..4bdac0d 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -326,7 +326,7 @@ function FeaturedHeroCard({ article, focalPoints }: { article: Article; focalPoi function FeaturedCarousel({ articles, popular, galleryImages, focalPoints }: { articles: Article[]; popular?: Article[]; galleryImages?: GalleryImage[]; focalPoints?: Record }) { const pageSize = 3; - const totalPages = Math.max(1, Math.ceil(articles.length / pageSize)); + const totalPages = Math.max(1, Math.ceil(Math.min(articles.length, 9) / pageSize)); const [page, setPage] = useState(0); const [paused, setPaused] = useState(false);