Merge branch 'media-modal-hotkeys' into 'develop'

MediaModal: fix hotkey navigation

Closes #1209

See merge request soapbox-pub/soapbox!1930
This commit is contained in:
Alex Gleason 2022-11-23 20:01:00 +00:00
commit cd282079a2

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;