diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 301a390..9becdd9 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -360,7 +360,7 @@ function FeaturedHeroCard({ article, focalPoints }: { article: Article; focalPoi ); } -function FeaturedCarousel({ articles, popular, galleryImages, focalPoints, wideArticles }: { articles: Article[]; popular?: Article[]; galleryImages?: GalleryImage[]; focalPoints?: Record; wideArticles?: Article[] }) { +function FeaturedCarousel({ articles, popular, galleryImages, focalPoints }: { articles: Article[]; popular?: Article[]; galleryImages?: GalleryImage[]; focalPoints?: Record }) { const pageSize = 3; const totalPages = Math.max(1, Math.ceil(Math.min(articles.length, 9) / pageSize)); const [page, setPage] = useState(0); @@ -393,10 +393,8 @@ function FeaturedCarousel({ articles, popular, galleryImages, focalPoints, wideA -
+
{popular && popular.length > 0 && } - {wideArticles && wideArticles.length > 0 && } - {wideArticles && wideArticles.length > 1 && }
{totalPages > 1 && ( @@ -510,7 +508,7 @@ export default function Home() {
- 1 ? [shuffled[shuffled.length - 1], shuffled[shuffled.length - 2]] : []} /> + {gridRows.map((row, ri) => (
@@ -524,6 +522,13 @@ export default function Home() {
))} + {shuffled.length > 1 && ( +
+ + +
+ )} +