diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index d7e5e8d..b378a86 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -220,29 +220,34 @@ function FeaturedCarousel({ articles, popular, galleryImages }: { articles: Arti }, [paused, next, total]); const isGalleryPage = hasGallery && page === total - 1; + const isWidePage = page === 1; let hero: Article | null = null; let side: Article[] = []; if (!isGalleryPage && articles.length > 0) { hero = articles[page % articles.length]; - side = [ - articles[(page * 2 + 1) % articles.length], - articles[(page * 2 + 2) % articles.length], - ]; + if (!isWidePage) { + side = [ + articles[(page * 2 + 1) % articles.length], + articles[(page * 2 + 2) % articles.length], + ]; + } } + const wide = isGalleryPage || isWidePage; + return (
setPaused(true)} onMouseLeave={() => setPaused(false)}>
-
+
{isGalleryPage && galleryImages ? ( ) : hero ? ( ) : null}
- {!isGalleryPage && ( + {!wide && (
{side.map((a) => (