Unverified Commit 975d96af authored by Emiliano Garcia's avatar Emiliano Garcia Committed by GitHub

Update: SharedModal.tsx swipe bug in with-cloudinary (#44771)

Co-authored-by: 's avatarJJ Kasper <jj@jjsweb.site>
parent 28afb887
......@@ -32,8 +32,16 @@ export default function SharedModal({
)
const handlers = useSwipeable({
onSwipedLeft: () => changePhotoId(index + 1),
onSwipedRight: () => changePhotoId(index - 1),
onSwipedLeft: () => {
if (index < images?.length - 1) {
changePhotoId(index + 1)
}
},
onSwipedRight: () => {
if (index > 0) {
changePhotoId(index - 1)
}
},
trackMouse: true,
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment