We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 94b8f79 + 735ee1d commit 7a80b2eCopy full SHA for 7a80b2e
src/pages/Mobile/index.tsx
@@ -52,13 +52,13 @@ const MobilePage: React.FC = () => {
52
const slideWidth = container.offsetWidth
53
54
if (currentSlide === 0) {
55
- container.style.transition = 'none'
56
- container.style.transform = `translateX(0)`
+ container.style.transform = `translateX(-${totalSlides * slideWidth}px)`
57
setTimeout(() => {
58
- container.style.transition = 'transform 0.5s ease'
59
- container.style.transform = `translateX(-${slideWidth}px)`
60
- }, 50)
+ container.style.transition = 'none'
+ container.style.transform = `translateX(0)`
+ }, 500)
61
} else {
+ container.style.transition = 'transform 0.5s ease'
62
container.style.transform = `translateX(-${currentSlide * slideWidth}px)`
63
}
64
0 commit comments