From 0b764fd360ca7079a6487b9beaa84b622013d226 Mon Sep 17 00:00:00 2001 From: sebastjanartic <45803536-sebastjanartic@users.noreply.replit.com> Date: Sat, 30 Aug 2025 21:55:04 +0000 Subject: [PATCH] Organize video categories and adjust data fetching for better display Update NetflixGrid to reorder categories and increase the limit for video fetching in the home page API call to ensure all content sections are populated. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 051a65da-1176-4478-a61c-c662f2a15536 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/051a65da-1176-4478-a61c-c662f2a15536/9NQBiz8 --- client/src/components/netflix-grid.tsx | 16 ++++++++-------- client/src/pages/home.tsx | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx index 3cd28fe..eae5150 100644 --- a/client/src/components/netflix-grid.tsx +++ b/client/src/components/netflix-grid.tsx @@ -51,6 +51,14 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { ); return [ + { + title: "Meist Angesehen", + videos: sortedByViews.slice(0, 10) + }, + ...(folxStadlVideos.length > 0 ? [{ + title: "FOLX STADL", + videos: folxStadlVideos.slice(0, 12) + }] : []), { title: "GDL VIDEO", videos: (() => { @@ -94,14 +102,6 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) { return result; })() }, - ...(folxStadlVideos.length > 0 ? [{ - title: "FOLX STADL", - videos: folxStadlVideos.slice(0, 12) - }] : []), - { - title: "Meist Angesehen", - videos: sortedByViews.slice(0, 10) - }, { title: "Trending Now", videos: videos.slice(0, 12) diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 9083784..c370416 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -27,7 +27,7 @@ export default function Home() { // Fetch videos with optimized loading const { data: videosResponse, isLoading, refetch } = useQuery({ queryKey: ["/api/videos", { - limit: 50, // Naloži samo 50 videev za hitrost + limit: 150, // Naloži dovolj videov za vse kategorije offset: 0, search: searchQuery || undefined }],