Adjust ad placement to prevent them from appearing consecutively

Modify the logic to insert advertisements every 8 articles instead of every 3, ensuring ads are spaced out appropriately within category pages.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 23852c00-4779-460a-9e0c-d09fee4b6c92
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 43ca32da-c849-4dd5-8ea3-60b8fe2bcf3a
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/23852c00-4779-460a-9e0c-d09fee4b6c92/ee1CXlO
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
sebastjanartic 2026-03-06 15:39:39 +00:00
parent fa8cfc58fe
commit f3d4596d26

View File

@ -193,7 +193,7 @@ export default function CategoryPage() {
</article>
</Link>,
];
if ((index + 1) % 3 === 0) {
if ((index + 1) % 8 === 0) {
items.push(<ArticleCardAd key={`ad-cat-${index}`} />);
}
return items;