Update the featured articles section to automatically rotate and display the latest articles
Modify the `FeaturedSection` component to include auto-rotation functionality, displaying up to 6 articles in a carousel. Update the `getFeaturedArticles` database query to retrieve the latest 6 articles instead of only those marked as featured. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 413891e8-d784-4bea-b9f5-91a5a68316b4 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: e6e519fc-41a3-463e-88ea-3bde9e02f7f4 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
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ export class DatabaseStorage implements IStorage {
|
||||
}
|
||||
|
||||
async getFeaturedArticles(): Promise<Article[]> {
|
||||
return db.select().from(articles).where(eq(articles.featured, true)).orderBy(desc(articles.publishedAt)).limit(3);
|
||||
return db.select().from(articles).orderBy(desc(articles.publishedAt)).limit(6);
|
||||
}
|
||||
|
||||
async getPopularArticles(limit: number): Promise<Article[]> {
|
||||
|
||||
Reference in New Issue
Block a user