fix opening explorer from log
This commit is contained in:
parent
4f67ad32c7
commit
cd523cc8f3
1 changed files with 5 additions and 3 deletions
|
@ -18,7 +18,7 @@ const mapStateToProps = (state) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
function Content({ logs, dispatch }) {
|
function Content({ logs, dispatch, router }) {
|
||||||
|
|
||||||
const darkMode = !(document.body && document.body.classList.contains('theme-mastodon-light'));
|
const darkMode = !(document.body && document.body.classList.contains('theme-mastodon-light'));
|
||||||
|
|
||||||
|
@ -35,12 +35,12 @@ function Content({ logs, dispatch }) {
|
||||||
clickableLinks
|
clickableLinks
|
||||||
onLinkClick={(url) => {
|
onLinkClick={(url) => {
|
||||||
dispatch(setExplorerUrl(url));
|
dispatch(setExplorerUrl(url));
|
||||||
this.context.router.history.push('/activitypub_explorer');
|
router.history.push('/activitypub_explorer');
|
||||||
}}
|
}}
|
||||||
showExplorerLink
|
showExplorerLink
|
||||||
onExplorerLinkClick={(data) => {
|
onExplorerLinkClick={(data) => {
|
||||||
dispatch(setExplorerData(data));
|
dispatch(setExplorerData(data));
|
||||||
this.context.router.history.push('/activitypub_explorer');
|
router.history.push('/activitypub_explorer');
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -61,6 +61,7 @@ function Content({ logs, dispatch }) {
|
||||||
Content.propTypes = {
|
Content.propTypes = {
|
||||||
dispatch: PropTypes.func.isRequired,
|
dispatch: PropTypes.func.isRequired,
|
||||||
logs: PropTypes.array,
|
logs: PropTypes.array,
|
||||||
|
router: PropTypes.object,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -117,6 +118,7 @@ class ActivityLog extends ImmutablePureComponent {
|
||||||
<Content
|
<Content
|
||||||
logs={logs}
|
logs={logs}
|
||||||
dispatch={dispatch}
|
dispatch={dispatch}
|
||||||
|
router={this.context.router}
|
||||||
/>
|
/>
|
||||||
</Column>
|
</Column>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue