Skip to content

Commit

Permalink
fix page carousel in RTL
Browse files Browse the repository at this point in the history
  • Loading branch information
ayushnirwal committed Apr 17, 2023
1 parent abf6acf commit 9a2ee99
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -85,8 +85,8 @@ function useCarouselScroll({
);

const scrollByPx = carouselWidth;
const isAtStart = isRTL ? 1 === ratio : 0 === ratio;
const isAtEnd = isRTL ? 0 === ratio : 1 === ratio;
const isAtStart = isRTL ? 0 === ratio : 0 === ratio;
const isAtEnd = isRTL ? -1 === ratio : 1 === ratio;

const canScrollBack = hasOverflow && !isAtStart;
const canScrollForward = hasOverflow && !isAtEnd;
Expand Down

0 comments on commit 9a2ee99

Please sign in to comment.