lbry-desktop/ui/page/livestream/index.js
infinite-persistence d8dd860e04
Livestream page prop optimization
- Remove unused prop.
- Use primitives whenever possible, since object references could change.
2021-12-09 17:42:41 +08:00

19 lines
814 B
JavaScript

import { connect } from 'react-redux';
import { makeSelectTagInClaimOrChannelForUri, selectClaimForUri } from 'redux/selectors/claims';
import { doSetPlayingUri } from 'redux/actions/content';
import { doUserSetReferrer } from 'redux/actions/user';
import { selectUserVerifiedEmail } from 'redux/selectors/user';
import { DISABLE_COMMENTS_TAG } from 'constants/tags';
import { getChannelIdFromClaim } from 'util/claim';
import LivestreamPage from './view';
const select = (state, props) => ({
isAuthenticated: selectUserVerifiedEmail(state),
channelClaimId: getChannelIdFromClaim(selectClaimForUri(state, props.uri)),
chatDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state),
});
export default connect(select, {
doSetPlayingUri,
doUserSetReferrer,
})(LivestreamPage);