fix: show pagination controls for all users unconditionally

This commit is contained in:
Carlos (Almeira) 2026-07-02 08:44:33 -05:00
parent b397d7540d
commit 209a0eff25

View File

@ -242,29 +242,27 @@ export default async function Home(props: { searchParams: Promise<{ [key: string
)}
{/* Pagination Controls */}
{totalPages > 1 && (
<div className="flex justify-center items-center gap-4 mt-12">
{page > 1 ? (
<a href={`/?page=${page - 1}${adminMonth ? `&month=${adminMonth}` : ''}#noticias`} className="px-6 py-3 rounded-xl bg-slate-800/80 text-white font-bold hover:bg-slate-700 transition-colors border border-white/10">
Anterior
</a>
) : (
<div className="px-6 py-3 rounded-xl bg-slate-800/40 text-slate-500 font-bold border border-white/5 cursor-not-allowed">
Anterior
</div>
)}
<span className="text-slate-400 font-medium">Página {page} de {totalPages}</span>
{page < totalPages ? (
<a href={`/?page=${page + 1}${adminMonth ? `&month=${adminMonth}` : ''}#noticias`} className="px-6 py-3 rounded-xl bg-cyan-600 text-white font-bold hover:bg-cyan-500 transition-colors shadow-[0_0_15px_rgba(6,182,212,0.3)]">
Siguiente
</a>
) : (
<div className="px-6 py-3 rounded-xl bg-slate-800/40 text-slate-500 font-bold border border-white/5 cursor-not-allowed">
Siguiente
</div>
)}
</div>
)}
<div className="flex justify-center items-center gap-4 mt-12">
{page > 1 ? (
<a href={`/?page=${page - 1}${adminMonth ? `&month=${adminMonth}` : ''}#noticias`} className="px-6 py-3 rounded-xl bg-slate-800/80 text-white font-bold hover:bg-slate-700 transition-colors border border-white/10">
Anterior
</a>
) : (
<div className="px-6 py-3 rounded-xl bg-slate-800/40 text-slate-500 font-bold border border-white/5 cursor-not-allowed">
Anterior
</div>
)}
<span className="text-slate-400 font-medium">Página {page} de {totalPages}</span>
{page < totalPages ? (
<a href={`/?page=${page + 1}${adminMonth ? `&month=${adminMonth}` : ''}#noticias`} className="px-6 py-3 rounded-xl bg-cyan-600 text-white font-bold hover:bg-cyan-500 transition-colors shadow-[0_0_15px_rgba(6,182,212,0.3)]">
Siguiente
</a>
) : (
<div className="px-6 py-3 rounded-xl bg-slate-800/40 text-slate-500 font-bold border border-white/5 cursor-not-allowed">
Siguiente
</div>
)}
</div>
</div>
{hasSidebar && (