diff --git a/client/src/pages/FolxStadlPage.tsx b/client/src/pages/FolxStadlPage.tsx index 3a8f762..ff0ad0d 100644 --- a/client/src/pages/FolxStadlPage.tsx +++ b/client/src/pages/FolxStadlPage.tsx @@ -19,7 +19,7 @@ export default function FolxStadlPage() { const itemsPerPage = 10; const { data, isLoading } = useQuery<{videos: Video[], total: number}>({ - queryKey: ['/api/videos?limit=200'], + queryKey: ['/api/videos?limit=50'], select: (response) => response || { videos: [], total: 0 } }); diff --git a/client/src/pages/home.tsx b/client/src/pages/home.tsx index 9b9f27e..9083784 100644 --- a/client/src/pages/home.tsx +++ b/client/src/pages/home.tsx @@ -24,10 +24,10 @@ export default function Home() { - // Fetch videos with aggressive caching for speed + // Fetch videos with optimized loading const { data: videosResponse, isLoading, refetch } = useQuery({ queryKey: ["/api/videos", { - limit: 1000, // Naloži vse videje naenkrat + limit: 50, // Naloži samo 50 videev za hitrost offset: 0, search: searchQuery || undefined }],