Fix: recent change reverted view context in expanded media view link

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2022-01-14 16:46:53 +01:00
parent 7e5fb63deb
commit 454b6a6f72
1 changed files with 5 additions and 0 deletions

View File

@ -32,6 +32,10 @@ class MediaModal extends ImmutablePureComponent {
intl: PropTypes.object.isRequired,
};
static contextTypes = {
router: PropTypes.object,
}
state = {
index: null,
navigationHidden: false,
@ -94,6 +98,7 @@ class MediaModal extends ImmutablePureComponent {
const acct = account.get('acct');
const statusId = status.get('id');
this.context.router.history.push(`/@${acct}/posts/${statusId}`);
this.props.onClose(null, true);
}
}