lbry-desktop/ui/component/channelDiscussion/index.js

20 lines
625 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
import { withRouter } from 'react-router';
import { makeSelectCommentForCommentId } from 'redux/selectors/comments';
import ChannelDiscussion from './view';
2021-02-04 06:45:49 +01:00
import { makeSelectTagsForUri } from 'lbry-redux';
const select = (state, props) => {
const { search } = props.location;
const urlParams = new URLSearchParams(search);
const linkedCommentId = urlParams.get('lc');
return {
linkedComment: makeSelectCommentForCommentId(linkedCommentId)(state),
2021-02-04 06:45:49 +01:00
tags: makeSelectTagsForUri(props.uri)(state),
};
};
export default withRouter(connect(select)(ChannelDiscussion));