Slow down the automatic scrolling speed of video carousels

Adjust the scrolling interval within the SimpleCarousel component to reduce the automatic scroll speed from 8/3 to 3/1.5 pixels per interval for both fast and normal speeds.

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 17:22:01 +00:00
parent b9a80de311
commit 86dee25154

View File

@ -32,7 +32,7 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse
scrollIntervalRef.current = setInterval(() => {
if (!scrollContainerRef.current) return;
const currentSpeed = newSpeed === 'fast' ? 8 : 3;
const currentSpeed = newSpeed === 'fast' ? 3 : 1.5;
const scrollAmount = direction === 'right' ? currentSpeed : -currentSpeed;
scrollContainerRef.current.scrollBy({
left: scrollAmount,
@ -57,7 +57,7 @@ export default function SimpleCarousel({ category, onVideoClick }: SimpleCarouse
scrollIntervalRef.current = setInterval(() => {
if (!scrollContainerRef.current) return;
const currentSpeed = speed === 'fast' ? 8 : 3;
const currentSpeed = speed === 'fast' ? 3 : 1.5;
const scrollAmount = direction === 'right' ? currentSpeed : -currentSpeed;
scrollContainerRef.current.scrollBy({
left: scrollAmount,