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);