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
This commit is contained in:
sebastjanartic 2025-08-30 21:55:04 +00:00
parent b8a6f41d3e
commit 0b764fd360
2 changed files with 9 additions and 9 deletions

View File

@ -51,6 +51,14 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
); );
return [ return [
{
title: "Meist Angesehen",
videos: sortedByViews.slice(0, 10)
},
...(folxStadlVideos.length > 0 ? [{
title: "FOLX STADL",
videos: folxStadlVideos.slice(0, 12)
}] : []),
{ {
title: "GDL VIDEO", title: "GDL VIDEO",
videos: (() => { videos: (() => {
@ -94,14 +102,6 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
return result; return result;
})() })()
}, },
...(folxStadlVideos.length > 0 ? [{
title: "FOLX STADL",
videos: folxStadlVideos.slice(0, 12)
}] : []),
{
title: "Meist Angesehen",
videos: sortedByViews.slice(0, 10)
},
{ {
title: "Trending Now", title: "Trending Now",
videos: videos.slice(0, 12) videos: videos.slice(0, 12)

View File

@ -27,7 +27,7 @@ export default function Home() {
// Fetch videos with optimized loading // Fetch videos with optimized loading
const { data: videosResponse, isLoading, refetch } = useQuery<VideosResponse>({ const { data: videosResponse, isLoading, refetch } = useQuery<VideosResponse>({
queryKey: ["/api/videos", { queryKey: ["/api/videos", {
limit: 50, // Naloži samo 50 videev za hitrost limit: 150, // Naloži dovolj videov za vse kategorije
offset: 0, offset: 0,
search: searchQuery || undefined search: searchQuery || undefined
}], }],