MediaModal: fix hotkey navigation

Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1209
This commit is contained in:
Alex Gleason 2022-11-23 13:46:00 -06:00
parent c4d3719918
commit 16f52538ce
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -83,7 +83,7 @@ const MediaModal: React.FC<IMediaModal> = (props) => {
return () => {
window.removeEventListener('keydown', handleKeyDown);
};
}, []);
}, [index]);
const getIndex = () => {
return index !== null ? index : props.index;