Skip to content

Commit 1423e5c

Browse files
committed
Fix(carousel): fix carousel flash bug when dragged
1 parent 11d27d3 commit 1423e5c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

frontend/src/pages/HomePage/components/Carousel/carousel.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ export class Carousel extends React.Component {
3737

3838
public autoPlayCarousel = (carousels: M.Carousel[]) => {
3939
carousels.forEach((carousel) => {
40-
carousel.next();
40+
if (!carousel.pressed) {
41+
carousel.next();
42+
}
4143
});
4244
this.timer = window.setTimeout(() => this.autoPlayCarousel(carousels), CAROUSEL_AUTOPLAY_INTERVAL);
4345
}

0 commit comments

Comments
 (0)