Skip to content

Commit

Permalink
fix: fix shuffle in text-carousel
Browse files Browse the repository at this point in the history
  • Loading branch information
lialila committed Oct 31, 2024
1 parent 9122c0d commit ad1a2c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/slices/TextCarousel/TextCarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export const TextCarousel: React.FC<TextCarouselProps> = ({
const { slides, isShuffled = false } = slice;

useEffect(() => {
if (isShuffled && typeof window === 'undefined') {
if (isShuffled) {
setDisplaySlides(shuffleElements(slides));
}
}, [slides, isShuffled]);
Expand Down

0 comments on commit ad1a2c9

Please sign in to comment.