fix: Fixed issue with right arrow not working

This commit is contained in:
florian 2023-08-13 13:40:08 +02:00
parent 16ef4d7d1a
commit 4f490c1e06
2 changed files with 4 additions and 3 deletions

View File

@ -26,8 +26,9 @@ const GridView = ({ settings, images }: GridViewProps) => {
const onKeyDown = (event: KeyboardEvent) => {
console.log(event);
if (event.key === 'ArrowRight') {
setActiveImageIdx(idx => (idx !== undefined && idx < sortedImages.length - 1 ? idx + 1 : idx));
setActiveImageIdx(idx => idx !== undefined ? idx + 1 : 0);
}
if (event.key === 'ArrowLeft') {
setActiveImageIdx(idx => (idx !== undefined && idx > 0 ? idx - 1 : idx));

View File

@ -74,9 +74,9 @@ export const adultContentTags = [
'naked',
'nakedart',
'nasstr',
'adult',
'nude',
'nodestr',
'nsfw',
'nude',
'nudeart',
'nudes',
'onlyfans',