From a17f989ba1ca3a8dd09e5538ddad725ae3b220c9 Mon Sep 17 00:00:00 2001 From: "Carlos (Almeira)" Date: Thu, 9 Jul 2026 09:52:54 -0500 Subject: [PATCH] Fix banner visibility, rotation timers, and logo distortion --- src/app/login/page.tsx | 2 +- src/components/ClientSidebars.tsx | 5 ++++- src/components/Navbar.tsx | 4 ++-- src/components/TopBanner.tsx | 11 +++++++---- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/app/login/page.tsx b/src/app/login/page.tsx index d8c708f..63d7565 100644 --- a/src/app/login/page.tsx +++ b/src/app/login/page.tsx @@ -15,7 +15,7 @@ export default async function LoginPage() {
{entity?.logotipo ? ( - {entity?.razon_social + {entity?.razon_social ) : (
diff --git a/src/components/ClientSidebars.tsx b/src/components/ClientSidebars.tsx index 617be0d..b4fface 100644 --- a/src/components/ClientSidebars.tsx +++ b/src/components/ClientSidebars.tsx @@ -30,9 +30,11 @@ function ClientCarouselGroup({ eslogan, ads, rotationSeconds }: { eslogan: strin useEffect(() => { if (!ads || ads.length <= 1) return; + const delay = (rotationSeconds && rotationSeconds > 0) ? rotationSeconds * 1000 : 5000; + const interval = setInterval(() => { setCurrentIndex(prev => (prev + 1) % ads.length); - }, rotationSeconds * 1000); + }, delay); return () => clearInterval(interval); }, [ads, rotationSeconds]); @@ -81,6 +83,7 @@ function ClientCarouselGroup({ eslogan, ads, rotationSeconds }: { eslogan: strin {/* eslint-disable-next-line @next/next/no-img-element */} {activeAd.titulo} { {/* Brand Logo Holográfico */} {entity?.logotipo ? ( -
+
- {entity?.razon_social + {entity?.razon_social
) : (
diff --git a/src/components/TopBanner.tsx b/src/components/TopBanner.tsx index a4963bd..8487cda 100644 --- a/src/components/TopBanner.tsx +++ b/src/components/TopBanner.tsx @@ -11,9 +11,11 @@ export default function TopBanner({ initialBanners, rotationSeconds }: { initial useEffect(() => { if (!initialBanners || initialBanners.length <= 1) return; + const delay = (rotationSeconds && rotationSeconds > 0) ? rotationSeconds * 1000 : 5000; + const interval = setInterval(() => { setCurrentIndex(prev => (prev + 1) % initialBanners.length); - }, rotationSeconds * 1000); + }, delay); return () => clearInterval(interval); }, [initialBanners, rotationSeconds]); @@ -51,17 +53,18 @@ export default function TopBanner({ initialBanners, rotationSeconds }: { initial }; return ( -
+
{/* Metric Impression Observer resets key on change to fire new impression */} -
+
{/* eslint-disable-next-line @next/next/no-img-element */} {activeBanner.titulo} {activeBanner.url_destino && (