fix(SW-96): use function declarations
This commit is contained in:
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user