artcraft: land on previous batch's last image when arrow-key paging left

PageDraw lightbox left-arrow at a batch boundary called openBatchInLightbox
without a startIndex, defaulting to 0, so leftward traversal skipped every
non-first image in each prior batch.
This commit is contained in:
Tanish Manku committed 2026-05-05 16:07:27 -07:00
1 parent 036aa3545f
commit 3e386a9127
1 file changed
+7 -1
@@ -159,7 +159,13 @@ const TextToImage = ({ imageMediaId, imageUrl }: TextToImageProps) => {
galleryModalLightboxNavPrev.value =
batchIndex > 0
? () => openBatchInLightbox(inverseBatchRef.current[batchIndex - 1])
? () => {
const prevBatch = inverseBatchRef.current[batchIndex - 1];
openBatchInLightbox(
prevBatch,
Math.max(0, prevBatch.images.length - 1),
);
}
: null;
galleryModalLightboxNavNext.value =
batchIndex < inverseBatchRef.current.length - 1