b096aad70e
- Remove embedPlayButton for fileRenderInitiator - getThumbnailFromClaim from utils function instead of redux - Improve playingUri
40 lines
1.5 KiB
JavaScript
40 lines
1.5 KiB
JavaScript
import { connect } from 'react-redux';
|
|
import { makeSelectTagInClaimOrChannelForUri, selectClaimForUri } from 'redux/selectors/claims';
|
|
import { doSetPrimaryUri } from 'redux/actions/content';
|
|
import { doUserSetReferrer } from 'redux/actions/user';
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
import { DISABLE_COMMENTS_TAG } from 'constants/tags';
|
|
import { doCommentSocketConnect, doCommentSocketDisconnect } from 'redux/actions/websocket';
|
|
import { getChannelIdFromClaim } from 'util/claim';
|
|
import {
|
|
selectActiveLivestreamForChannel,
|
|
selectActiveLivestreamInitialized,
|
|
selectCommentSocketConnected,
|
|
} from 'redux/selectors/livestream';
|
|
import { doFetchChannelLiveStatus, doSetSocketConnected } from 'redux/actions/livestream';
|
|
import LivestreamPage from './view';
|
|
|
|
const select = (state, props) => {
|
|
const { uri } = props;
|
|
const channelClaimId = getChannelIdFromClaim(selectClaimForUri(state, uri));
|
|
|
|
return {
|
|
isAuthenticated: selectUserVerifiedEmail(state),
|
|
channelClaimId,
|
|
chatDisabled: makeSelectTagInClaimOrChannelForUri(uri, DISABLE_COMMENTS_TAG)(state),
|
|
activeLivestreamForChannel: selectActiveLivestreamForChannel(state, channelClaimId),
|
|
activeLivestreamInitialized: selectActiveLivestreamInitialized(state),
|
|
socketConnected: selectCommentSocketConnected(state),
|
|
};
|
|
};
|
|
|
|
const perform = {
|
|
doSetPrimaryUri,
|
|
doUserSetReferrer,
|
|
doCommentSocketConnect,
|
|
doCommentSocketDisconnect,
|
|
doFetchChannelLiveStatus,
|
|
doSetSocketConnected,
|
|
};
|
|
|
|
export default connect(select, perform)(LivestreamPage);
|