diff --git a/components/campaigns/AnnouncementHero.tsx b/components/campaigns/AnnouncementHero.tsx index e4669d7e3b5..005bbb1719e 100644 --- a/components/campaigns/AnnouncementHero.tsx +++ b/components/campaigns/AnnouncementHero.tsx @@ -54,7 +54,7 @@ export default function AnnouncementHero({ className = '', small = false }: IAnn {numberOfVisibleBanners > 1 && (
@@ -62,26 +62,30 @@ export default function AnnouncementHero({ className = '', small = false }: IAnn )}
- {visibleBanners.map((banner, index) => { - // Only render active banner and immediate neighbors - const isVisible = Math.abs(index - (activeIndex % numberOfVisibleBanners)) <= 1; - if (!isVisible) return null; - return( - - ); - })} + {visibleBanners.map((banner, index) => { + // Only render active banner and immediate neighbors + const isVisible = Math.abs(index - (activeIndex % numberOfVisibleBanners)) <= 1; + + if (!isVisible) { + return null; + } + + return ( + + ); + })}
{visibleBanners.map((banner, index) => ( @@ -98,7 +102,7 @@ export default function AnnouncementHero({ className = '', small = false }: IAnn {numberOfVisibleBanners > 1 && (