diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index a85f957..220a866 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, sideArticle }: { articles: Article[]; popular?: Article[]; galleryImages?: GalleryImage[]; focalPoints?: Record; sideArticle?: 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,9 +393,8 @@ function FeaturedCarousel({ articles, popular, galleryImages, focalPoints, sideA -
+
{popular && popular.length > 0 && } - {sideArticle && }
{totalPages > 1 && ( @@ -522,7 +521,7 @@ export default function Home() {
- + {gridRows.map((row, ri) => (
@@ -536,9 +535,11 @@ export default function Home() {
))} - {widePickedArticles.length > 1 && ( + {widePickedArticles.length > 0 && (
- + {widePickedArticles.map((a) => ( + + ))}
)}