diff --git a/app/javascript/gabsocial/components/modal/media_modal.js b/app/javascript/gabsocial/components/modal/media_modal.js index 791e0983..5128d7fb 100644 --- a/app/javascript/gabsocial/components/modal/media_modal.js +++ b/app/javascript/gabsocial/components/modal/media_modal.js @@ -67,28 +67,10 @@ class MediaModal extends ImmutablePureComponent { componentDidMount() { window.addEventListener('keydown', this.handleKeyDown, false) - - if (this.context.router) { - const history = this.context.router.history - - history.push(history.location.pathname, previewState) - - this.unlistenHistory = history.listen(() => { - this.props.onClose() - }) - } } componentWillUnmount() { window.removeEventListener('keydown', this.handleKeyDown) - - if (this.context.router) { - this.unlistenHistory() - - if (this.context.router.history.location.state === previewState) { - this.context.router.history.goBack() - } - } } getIndex() {