fix: hero carousel indicators not scrolling

This commit is contained in:
Prayag Prajapati committed 2024-11-10 23:19:44 +05:30
1 parent 9d4d523d9d
commit e91834ad6d
3 files changed
+4 -4

No files matched your search

+2 -2
View File
@@ -90,7 +90,7 @@ const Slider = ({
scrollPosition - scrollOffset - visibleItems * cardWidth,
0,
);
setX.start({
setX({
from: { x: scrollPosition },
to: { x: newX },
onChange: (results) => {
@@ -123,7 +123,7 @@ const Slider = ({
scrollPosition - scrollOffset + visibleItems * cardWidth,
containerRef.current?.scrollWidth ?? 0 - clientWidth,
);
setX.start({
setX({
from: { x: scrollPosition },
to: { x: newX },
onChange: (results) => {