Improve video grid rendering and display

Refactor client/src/components/netflix-grid.tsx to simplify video rendering logic from infinite scroll to a simple list and add a debug number overlay.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2eb1084e-b728-4449-9231-f1665924c8d5
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2eb1084e-b728-4449-9231-f1665924c8d5/yexZbDm
This commit is contained in:
sebastjanartic 2025-08-29 16:55:03 +00:00
parent 3baeabcbc7
commit af4b2357f6

View File

@ -336,31 +336,32 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
transition: 'transform 0.3s ease' transition: 'transform 0.3s ease'
}} }}
> >
{/* Many copies for true infinite scroll */} {/* Simple list to test movement */}
{[...Array(10)].flatMap(() => category.videos).map((video, index) => { {category.videos.map((video, index) => (
const actualIndex = index % category.videos.length; <div key={`${video.id}-${index}`} className="flex-shrink-0 w-28 md:w-52 relative group">
return ( {/* Top 10 Number overlay for first category */}
<div key={`${video.id}-${Math.floor(index / category.videos.length)}-${actualIndex}`} className="flex-shrink-0 w-28 md:w-52 relative group"> {category.title.includes("Top 10") && (
{/* Top 10 Number overlay for first category */} <div className="absolute top-1 left-1 z-30 text-white font-black text-3xl md:text-5xl drop-shadow-2xl pointer-events-none"
{category.title.includes("Top 10") && ( style={{
<div className="absolute top-1 left-1 z-30 text-white font-black text-3xl md:text-5xl drop-shadow-2xl pointer-events-none" textShadow: '4px 4px 8px rgba(0,0,0,0.8), -2px -2px 4px rgba(0,0,0,0.6)',
style={{ WebkitTextStroke: '2px rgba(0,0,0,0.8)',
textShadow: '4px 4px 8px rgba(0,0,0,0.8), -2px -2px 4px rgba(0,0,0,0.6)', transform: 'none',
WebkitTextStroke: '2px rgba(0,0,0,0.8)', transition: 'none'
transform: 'none', }}>
transition: 'none' {index + 1}
}}> </div>
{actualIndex + 1} )}
</div> <VideoCard
)} video={video}
<VideoCard onClick={onVideoClick}
video={video} className="w-full hover:scale-105 hover:z-10 transition-all duration-300 group-hover:shadow-xl rounded-md overflow-hidden"
onClick={onVideoClick} />
className="w-full hover:scale-105 hover:z-10 transition-all duration-300 group-hover:shadow-xl rounded-md overflow-hidden" {/* Debug number to see movement */}
/> <div className="absolute bottom-0 right-0 bg-red-500 text-white text-xs px-1 rounded">
{index + 1}
</div> </div>
); </div>
})} ))}
</div> </div>
</div> </div>
</div> </div>