2021-03-02 03:07:10 +01:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-17 10:36:14 +02:00
|
|
|
import { makeSelectTagInClaimOrChannelForUri, makeSelectClaimForUri } from 'redux/selectors/claims';
|
|
|
|
import { doResolveUri } from 'redux/actions/claims';
|
2021-03-15 15:32:51 +01:00
|
|
|
import { doSetPlayingUri } from 'redux/actions/content';
|
|
|
|
import { doUserSetReferrer } from 'redux/actions/user';
|
|
|
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
|
|
|
import { selectHasUnclaimedRefereeReward } from 'redux/selectors/rewards';
|
2021-06-03 17:55:16 +02:00
|
|
|
import { DISABLE_COMMENTS_TAG } from 'constants/tags';
|
2021-03-15 15:32:51 +01:00
|
|
|
import LivestreamPage from './view';
|
2021-03-02 03:07:10 +01:00
|
|
|
|
2021-03-22 10:42:02 +01:00
|
|
|
const select = (state, props) => ({
|
2021-03-15 15:32:51 +01:00
|
|
|
hasUnclaimedRefereeReward: selectHasUnclaimedRefereeReward(state),
|
|
|
|
isAuthenticated: selectUserVerifiedEmail(state),
|
2021-03-22 10:42:02 +01:00
|
|
|
channelClaim: makeSelectClaimForUri(props.uri)(state),
|
2021-06-03 17:55:16 +02:00
|
|
|
chatDisabled: makeSelectTagInClaimOrChannelForUri(props.uri, DISABLE_COMMENTS_TAG)(state),
|
2021-03-02 03:07:10 +01:00
|
|
|
});
|
|
|
|
|
2021-03-15 15:32:51 +01:00
|
|
|
export default connect(select, {
|
|
|
|
doSetPlayingUri,
|
|
|
|
doResolveUri,
|
|
|
|
doUserSetReferrer,
|
|
|
|
})(LivestreamPage);
|