From d1ba445592ca3b0b7d47429703aa03ef9fc48c30 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Wed, 3 Sep 2025 08:36:46 +0000 Subject: [PATCH] Limit displayed videos to 10 per row and randomize their order Adjusted video grid components to display a maximum of 10 videos per row, implementing a random shuffle for all video rows to enhance content variety. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/OdlP8Wj --- client/src/components/netflix-grid.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index c8d97c5..528bc30 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -59,7 +59,11 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { }, ...(folxStadlVideos.length > 0 ? [{ title: "FOLX STADL", - videos: folxStadlVideos.slice(0, 12) + videos: (() => { + // Shuffle FOLX STADL videos randomly + const shuffled = [...folxStadlVideos].sort(() => Math.random() - 0.5); + return shuffled.slice(0, 10); + })() }] : []), { title: "VIDEO", @@ -78,14 +82,14 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { !video.title.includes("Gipfelstammtisch") ); const shuffled = [...fallbackVideos].sort(() => Math.random() - 0.5); - return shuffled.slice(0, 15); + return shuffled.slice(0, 10); } // Shuffle the Geschichte des Liedes VIDEO videos randomly const shuffled = [...videoVideos].sort(() => Math.random() - 0.5); - // Return 15 random videos from the VIDEO collection - return shuffled.slice(0, 15); + // Return 10 random videos from the VIDEO collection + return shuffled.slice(0, 10); })() }, {