From a31532cb0337ee133386960a536edcd4a43daa4f Mon Sep 17 00:00:00 2001 From: "Carlos (Almeira)" Date: Thu, 26 Mar 2026 14:50:21 -0500 Subject: [PATCH] Fix: NewsTicker images/links and NewsCard footer button toggle --- src/components/NewsCard.tsx | 10 +++++++--- src/components/NewsTicker.tsx | 12 ++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/components/NewsCard.tsx b/src/components/NewsCard.tsx index e050326..1af1532 100644 --- a/src/components/NewsCard.tsx +++ b/src/components/NewsCard.tsx @@ -11,6 +11,7 @@ interface NewsCardProps { imagenUrl?: string | null; showCategory?: boolean; showFooterDate?: boolean; + showFooterButton?: boolean; footerText?: string; } @@ -24,6 +25,7 @@ export const NewsCard = ({ imagenUrl, showCategory = false, showFooterDate = true, + showFooterButton = true, footerText }: NewsCardProps) => { // Formatear fecha @@ -75,9 +77,11 @@ export const NewsCard = ({ footerText || "Ver más" )} -
- -
+ {showFooterButton && ( +
+ +
+ )} diff --git a/src/components/NewsTicker.tsx b/src/components/NewsTicker.tsx index 4751562..bf6b771 100644 --- a/src/components/NewsTicker.tsx +++ b/src/components/NewsTicker.tsx @@ -84,22 +84,18 @@ export default async function NewsTicker() {
{/* Doble render para bucle infinito visual de CSS Marquee */} {[...noticias, ...noticias].map((noticia, idx) => { - let imgUrl = null; - if (noticia.imagen_destacada_id) { - imgUrl = `${ENDPOINT}/storage/buckets/${noticia.imagen_destacada_id.bucket_id}/files/${noticia.imagen_destacada_id.file_id}/preview?project=${PROJECT_ID}&width=100&height=100&quality=80`; - } return ( - {imgUrl && ( + {noticia.imagenUrl && ( // eslint-disable-next-line @next/next/no-img-element - {noticia.titulo} + {noticia.titulo} )} - {!imgUrl && } + {!noticia.imagenUrl && } {noticia.titulo.length > 55 ? noticia.titulo.substring(0, 55) + '...' : noticia.titulo}