Merged in SW-2064-lightbox-fix (pull request #3467)
fix(SW-2064): fix next image idx * fix(SW-2064): fix next image idx Approved-by: Anton Gunnarsson
This commit is contained in:
@@ -18,7 +18,7 @@ export function useThumbnail({ images, mainImageIdx }: useThumbnailProps) {
|
|||||||
if (mainImageIdx < THUMBNAIL_OFFSET) {
|
if (mainImageIdx < THUMBNAIL_OFFSET) {
|
||||||
return {
|
return {
|
||||||
images: images.slice(0, THUMBNAIL_WINDOW),
|
images: images.slice(0, THUMBNAIL_WINDOW),
|
||||||
next: images[THUMBNAIL_WINDOW + 1],
|
next: images[THUMBNAIL_WINDOW],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (mainImageIdx >= images.length - THUMBNAIL_OFFSET) {
|
if (mainImageIdx >= images.length - THUMBNAIL_OFFSET) {
|
||||||
|
|||||||
Reference in New Issue
Block a user