Improve carousel display and fix overlapping edges

Adjusted padding and margin in SimpleCarousel component (`simple-carousel.tsx`) to correct overlapping edges and ensure proper display of carousel items.

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/kdQ95gE
This commit is contained in:
sebastjanartic 2025-08-29 18:13:13 +00:00
parent c5ac95846d
commit df5be7285c

View File

@ -101,7 +101,7 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse
{category.title}
</h2>
<div className="relative" style={{ overflow: 'visible' }}>
<div className="relative -mx-8 px-8" style={{ overflow: 'visible' }}>
{/* Left scroll button */}
<button
onClick={() => scroll('left')}
@ -125,14 +125,14 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse
{/* Scroll container */}
<div
ref={scrollContainerRef}
className="overflow-x-auto"
className="overflow-x-auto -mx-4 px-4"
style={{
overflowY: 'visible',
scrollbarWidth: 'none',
msOverflowStyle: 'none'
}}
>
<div className="flex space-x-4 pb-4 w-max" style={{ overflow: 'visible' }}>
<div className="flex space-x-4 pb-4 w-max -my-4 py-4" style={{ overflow: 'visible' }}>
{/* Create many copies for infinite feel */}
{Array.from({ length: 20 }).map((_, copyIndex) =>
category.videos.map((video, videoIndex) => (