diff --git a/client/src/components/netflix-grid.tsx b/client/src/components/netflix-grid.tsx
index 0d083e5..9c66d4b 100644
--- a/client/src/components/netflix-grid.tsx
+++ b/client/src/components/netflix-grid.tsx
@@ -141,22 +141,13 @@ function CategoryRow({ category, onVideoClick }: CategoryRowProps) {
if (scrollRef.current) {
const isMobile = window.innerWidth < 768;
const containerWidth = scrollRef.current.clientWidth;
- const scrollAmount = isMobile ? containerWidth * 0.8 : containerWidth * 0.6;
- const currentScroll = scrollRef.current.scrollLeft;
- const maxScroll = scrollRef.current.scrollWidth - scrollRef.current.clientWidth;
-
- let targetScroll;
+ const scrollAmount = isMobile ? containerWidth * 0.9 : containerWidth * 0.7;
if (direction === 'left') {
- targetScroll = Math.max(0, currentScroll - scrollAmount);
+ scrollRef.current.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
} else {
- targetScroll = Math.min(maxScroll, currentScroll + scrollAmount);
+ scrollRef.current.scrollBy({ left: scrollAmount, behavior: 'smooth' });
}
-
- scrollRef.current.scrollTo({
- left: targetScroll,
- behavior: 'smooth'
- });
}
};
diff --git a/client/src/components/vast-player.tsx b/client/src/components/vast-player.tsx
index 9370428..fdc4a8c 100644
--- a/client/src/components/vast-player.tsx
+++ b/client/src/components/vast-player.tsx
@@ -270,7 +270,7 @@ export default function VASTPlayer({ video, onClose, vastTagUrl, enableAds = tru
};
return (
-
+
{/* Close button */}