fix(SW-96): use function declarations

This commit is contained in:
Chuma McPhoy
2024-08-23 08:15:38 +02:00
parent 7e7a5d2646
commit 64a44f7dcc
2 changed files with 5 additions and 5 deletions

View File

@@ -31,12 +31,12 @@ export default function Gallery({
return thumbs
}
const handleNext = () => {
function handleNext() {
const nextIndex = (mainImageIndex + 1) % images.length
onSelectImage(images[nextIndex])
}
const handlePrev = () => {
function handlePrev() {
const prevIndex = (mainImageIndex - 1 + images.length) % images.length
onSelectImage(images[prevIndex])
}