MediaModal: fix hotkey navigation
Fixes https://gitlab.com/soapbox-pub/soapbox/-/issues/1209
This commit is contained in:
@ -83,7 +83,7 @@ const MediaModal: React.FC<IMediaModal> = (props) => {
|
||||
return () => {
|
||||
window.removeEventListener('keydown', handleKeyDown);
|
||||
};
|
||||
}, []);
|
||||
}, [index]);
|
||||
|
||||
const getIndex = () => {
|
||||
return index !== null ? index : props.index;
|
||||
|
||||
Reference in New Issue
Block a user