lbry-desktop/ui/component/livestreamComments/index.js
Dan Peterson 038692cafc
Feature livestream scheduling (#458)
Add livestream scheduling feature
Also supports back to back streams, and will notify on a non-active stream of an active one.
2021-12-16 16:59:13 -05:00

30 lines
1.1 KiB
JavaScript

import { connect } from 'react-redux';
import { MAX_LIVESTREAM_COMMENTS } from 'constants/livestream';
import { doResolveUris } from 'redux/actions/claims';
import { selectClaimForUri, selectMyClaimIdsRaw } from 'redux/selectors/claims';
import { doCommentList, doSuperChatList } from 'redux/actions/comments';
import {
selectTopLevelCommentsForUri,
selectIsFetchingComments,
selectSuperChatsForUri,
selectSuperChatTotalAmountForUri,
selectPinnedCommentsForUri,
} from 'redux/selectors/comments';
import LivestreamComments from './view';
const select = (state, props) => ({
claim: selectClaimForUri(state, props.uri),
comments: selectTopLevelCommentsForUri(state, props.uri, MAX_LIVESTREAM_COMMENTS),
pinnedComments: selectPinnedCommentsForUri(state, props.uri),
fetchingComments: selectIsFetchingComments(state),
superChats: selectSuperChatsForUri(state, props.uri),
superChatsTotalAmount: selectSuperChatTotalAmountForUri(state, props.uri),
myChannelIds: selectMyClaimIdsRaw(state),
});
export default connect(select, {
doCommentList,
doSuperChatList,
doResolveUris,
})(LivestreamComments);