From a216ac4bb8d87de99acb86160a9d0718c050bd03 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 28 Feb 2026 17:36:10 +0000 Subject: [PATCH] Display more articles in the featured section and slow down rotation Update the featured articles section to display up to 9 articles and increase the rotation interval to 8 seconds. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 413891e8-d784-4bea-b9f5-91a5a68316b4 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: e8c8597a-604e-4eee-ac5c-3d5b7ca4ba51 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/f209e72a-0939-48fa-84fc-57854de71967/413891e8-d784-4bea-b9f5-91a5a68316b4/kmpcO4B Replit-Helium-Checkpoint-Created: true --- client/src/pages/home.tsx | 4 ++-- server/storage.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index e94ffbe..2d39cf5 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -11,7 +11,7 @@ import Footer from "@/components/footer"; import { useState, useEffect, useCallback } from "react"; function FeaturedSection({ articles }: { articles: Article[] }) { - const pool = articles.slice(0, 6); + const pool = articles.slice(0, 9); const totalPages = Math.ceil(pool.length / 3); const [page, setPage] = useState(0); const [paused, setPaused] = useState(false); @@ -22,7 +22,7 @@ function FeaturedSection({ articles }: { articles: Article[] }) { useEffect(() => { if (paused || totalPages <= 1) return; - const timer = setInterval(next, 5000); + const timer = setInterval(next, 8000); return () => clearInterval(timer); }, [paused, next, totalPages]); diff --git a/server/storage.ts b/server/storage.ts index 7a2c320..b6c7df3 100644 --- a/server/storage.ts +++ b/server/storage.ts @@ -31,7 +31,7 @@ export class DatabaseStorage implements IStorage { } async getFeaturedArticles(): Promise { - return db.select().from(articles).orderBy(desc(articles.publishedAt)).limit(6); + return db.select().from(articles).orderBy(desc(articles.publishedAt)).limit(9); } async getPopularArticles(limit: number): Promise {