From 48ad517133d16d5570b7f793e4425768f30e3bbf Mon Sep 17 00:00:00 2001 From: "Carlos (Almeira)" Date: Thu, 26 Mar 2026 14:50:41 -0500 Subject: [PATCH] Fix: Finalize settings for NewsCard footer button and fix Ticker images --- src/app/clasificados/page.tsx | 4 +++- src/app/eventos/page.tsx | 4 +++- src/app/page.tsx | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/clasificados/page.tsx b/src/app/clasificados/page.tsx index 74b7082..6242429 100644 --- a/src/app/clasificados/page.tsx +++ b/src/app/clasificados/page.tsx @@ -10,12 +10,13 @@ async function fetchClasificadosData() { // 1. Settings const settingsRes = await client.databases.listDocuments(APPWRITE_ALMEIRA_CONFIG.databaseId, 'settings', []); - const settings = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {}; + const settings: any = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {}; const postsCount = settings.classifieds_count || 9; const cardSettings = { showCategory: settings.news_card_show_category ?? false, showFooterDate: settings.news_card_show_footer_date ?? true, + showFooterButton: settings.news_card_show_footer_button ?? true, footerText: settings.news_card_footer_text || "" }; @@ -125,6 +126,7 @@ export default async function ClasificadosPage() { imagenUrl={imagenUrl} showCategory={cardSettings.showCategory} showFooterDate={cardSettings.showFooterDate} + showFooterButton={cardSettings.showFooterButton} footerText={cardSettings.footerText} /> ) diff --git a/src/app/eventos/page.tsx b/src/app/eventos/page.tsx index a8ec1e0..80df50d 100644 --- a/src/app/eventos/page.tsx +++ b/src/app/eventos/page.tsx @@ -10,12 +10,13 @@ async function fetchEventosData() { // 1. Settings const settingsRes = await client.databases.listDocuments(APPWRITE_ALMEIRA_CONFIG.databaseId, 'settings', []); - const settings = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {}; + const settings: any = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {}; const postsCount = settings.events_count || 9; const cardSettings = { showCategory: settings.news_card_show_category ?? false, showFooterDate: settings.news_card_show_footer_date ?? true, + showFooterButton: settings.news_card_show_footer_button ?? true, footerText: settings.news_card_footer_text || "" }; @@ -125,6 +126,7 @@ export default async function EventosPage() { imagenUrl={imagenUrl} showCategory={cardSettings.showCategory} showFooterDate={cardSettings.showFooterDate} + showFooterButton={cardSettings.showFooterButton} footerText={cardSettings.footerText} /> ) diff --git a/src/app/page.tsx b/src/app/page.tsx index 5728d79..f31800c 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -11,12 +11,13 @@ async function fetchHomeData() { // 1. Settings const settingsRes = await client.databases.listDocuments(APPWRITE_ALMEIRA_CONFIG.databaseId, 'settings', []); - const settings = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {}; + const settings: any = settingsRes.documents.length > 0 ? settingsRes.documents[0] : {}; const postsCount = settings.feed_count || settings.post_count || 9; const cardSettings = { showCategory: settings.news_card_show_category ?? false, showFooterDate: settings.news_card_show_footer_date ?? true, + showFooterButton: settings.news_card_show_footer_button ?? true, footerText: settings.news_card_footer_text || "" }; @@ -148,6 +149,7 @@ export default async function Home() { imagenUrl={imagenUrl} showCategory={cardSettings.showCategory} showFooterDate={cardSettings.showFooterDate} + showFooterButton={cardSettings.showFooterButton} footerText={cardSettings.footerText} /> )