Improve video display by adding logging for better debugging
Add console logs to the NetflixGrid component to track video data and improve debugging when no videos are present. 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/d05DGZF
This commit is contained in:
parent
c12c2c8486
commit
06185bf445
@ -37,7 +37,11 @@ export default function NetflixGrid({ videos, isLoading }: NetflixGridProps) {
|
||||
|
||||
// Memoize categories to avoid recalculation on every render
|
||||
const categories = useMemo((): VideoCategory[] => {
|
||||
if (!videos.length) return [];
|
||||
console.log("NetflixGrid received videos:", videos.length, videos.slice(0, 2)); // Debug log
|
||||
if (!videos.length) {
|
||||
console.log("No videos to display"); // Debug log
|
||||
return [];
|
||||
}
|
||||
|
||||
// Sort by views for top content
|
||||
const sortedByViews = [...videos].sort((a, b) => (b.views || 0) - (a.views || 0));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user