Freeze scroll position when cursing with keyboard

This commit is contained in:
Sam Becker 2023-09-21 18:09:12 -05:00
parent a8f88c5d40
commit 458f36f4a2

View File

@ -34,14 +34,14 @@ export default function PhotoLinks({
case 'J':
if (previousPhoto) {
setNextPhotoAnimation?.(ANIMATION_RIGHT);
router.push(pathForPhoto(previousPhoto, tag));
router.push(pathForPhoto(previousPhoto, tag), { scroll: false });
}
break;
case 'ARROWRIGHT':
case 'L':
if (nextPhoto) {
setNextPhotoAnimation?.(ANIMATION_LEFT);
router.push(pathForPhoto(nextPhoto, tag));
router.push(pathForPhoto(nextPhoto, tag), { scroll: false });
}
break;
case 'ESCAPE':