2021-04-23 21:59:48 +02:00
|
|
|
import { connect } from 'react-redux';
|
2022-03-09 19:05:37 +01:00
|
|
|
import {
|
|
|
|
selectStakedLevelForChannelUri,
|
|
|
|
selectClaimForUri,
|
|
|
|
selectMyClaimIdsRaw,
|
|
|
|
selectClaimsByUri,
|
|
|
|
selectOdyseeMembershipForChannelId,
|
|
|
|
} from 'redux/selectors/claims';
|
|
|
|
|
2021-04-23 21:59:48 +02:00
|
|
|
import LivestreamComment from './view';
|
|
|
|
|
2021-12-31 12:45:16 +01:00
|
|
|
const select = (state, props) => {
|
|
|
|
const { uri, comment } = props;
|
2022-03-09 19:05:37 +01:00
|
|
|
const { channel_url: authorUri, channel_id: channelId } = comment;
|
2021-12-31 12:45:16 +01:00
|
|
|
|
|
|
|
return {
|
|
|
|
claim: selectClaimForUri(state, uri),
|
|
|
|
stakedLevel: selectStakedLevelForChannelUri(state, authorUri),
|
|
|
|
myChannelIds: selectMyClaimIdsRaw(state),
|
2022-03-09 19:05:37 +01:00
|
|
|
claimsByUri: selectClaimsByUri(state),
|
|
|
|
odyseeMembership: selectOdyseeMembershipForChannelId(state, channelId),
|
2021-12-31 12:45:16 +01:00
|
|
|
};
|
|
|
|
};
|
2021-04-23 21:59:48 +02:00
|
|
|
|
2022-03-09 19:05:37 +01:00
|
|
|
const perform = {};
|
|
|
|
|
|
|
|
export default connect(select, perform)(LivestreamComment);
|