diff --git a/src/app/[slug]/page.tsx b/src/app/[slug]/page.tsx index 07a4c8e..a69412b 100644 --- a/src/app/[slug]/page.tsx +++ b/src/app/[slug]/page.tsx @@ -6,6 +6,8 @@ import { Calendar, User, ArrowLeft } from 'lucide-react'; import Link from 'next/link'; async function fetchPostData(slugOrId: string) { + if (!slugOrId || typeof slugOrId !== 'string' || slugOrId.includes('.')) return null; + try { const client = await createAdminClient(); const dbId = APPWRITE_ALMEIRA_CONFIG.databaseId; @@ -25,7 +27,10 @@ async function fetchPostData(slugOrId: string) { return null; } } catch (e) { - console.error("Post detail fetch error", e); + // En desarrollo o por favicon.ico etc, esto puede fallar. Solo logueamos si es error real. + if (!slugOrId.includes('favicon')) { + console.error("Post detail fetch error for slug:", slugOrId, e); + } return null; } } diff --git a/src/components/NewsCard.tsx b/src/components/NewsCard.tsx index 8d935ad..17ae939 100644 --- a/src/components/NewsCard.tsx +++ b/src/components/NewsCard.tsx @@ -24,8 +24,8 @@ export const NewsCard = ({ fecha, imagenUrl, showCategory = false, - showFooterDate = true, - showFooterButton = true, + showFooterDate = false, + showFooterButton = false, footerText }: NewsCardProps) => { // Formatear fecha @@ -74,10 +74,10 @@ export const NewsCard = ({ {fechaFormateada} ) : ( - footerText || "Ver más" + footerText || "" )} - {showFooterButton && ( + {showFooterButton && footerText && (