Fix: Completed conditional sidebar and full-width grids across all pages with AD_BANNER support

This commit is contained in:
Carlos (Almeira) 2026-03-26 15:57:23 -05:00
parent f799c41ae7
commit 4b45712d49
2 changed files with 6 additions and 4 deletions

View File

@ -114,9 +114,11 @@ export default async function NoticiaDetail({ params }: { params: { slug: string
/>
</article>
<aside className="w-full lg:w-[320px] xl:w-[360px] shrink-0 sticky top-24 h-fit">
<GlobalSidebar />
</aside>
{hasSidebar && (
<aside className="w-full lg:w-[320px] xl:w-[360px] shrink-0 sticky top-24 h-fit">
<GlobalSidebar />
</aside>
)}
</div>
</div>
</main>

View File

@ -55,7 +55,7 @@ export async function GlobalSidebar() {
try {
const typesRes = await client.databases.listDocuments(APPWRITE_ALMEIRA_CONFIG.databaseId, 'publication_types', []);
const validCodes = ['DISPLAY_SLIDER', 'EVENTO', 'CLASIFICADO'];
const validCodes = ['DISPLAY_SLIDER', 'EVENTO', 'CLASIFICADO', 'AD_BANNER'];
const validTypeIds = typesRes.documents.filter(t => validCodes.includes(t.codigo)).map(t => t.$id);
if (validTypeIds.length > 0) {