8144a9bb87
Re-used lots of Anthony's code + made fixes to a few areas including the publish page. a new videojs video.js@7.18.1 + http-streaming@2.14.2 remove console log
25 lines
942 B
JavaScript
25 lines
942 B
JavaScript
import { connect } from 'react-redux';
|
|
import { selectClaimIsMineForUri, selectClaimForUri } from 'redux/selectors/claims';
|
|
import { doToast } from 'redux/actions/notifications';
|
|
import ClaimPreviewReset from './view';
|
|
import { selectActiveLivestreamForChannel } from 'redux/selectors/livestream';
|
|
import { getChannelIdFromClaim, getChannelNameFromClaim } from 'util/claim';
|
|
|
|
const select = (state, props) => {
|
|
const { uri } = props;
|
|
const claim = selectClaimForUri(state, uri);
|
|
const channelId = getChannelIdFromClaim(claim);
|
|
const channelName = getChannelNameFromClaim(claim);
|
|
return {
|
|
activeLivestreamForChannel: selectActiveLivestreamForChannel(state, channelId),
|
|
channelId,
|
|
channelName,
|
|
claimIsMine: props.uri && selectClaimIsMineForUri(state, props.uri),
|
|
};
|
|
};
|
|
|
|
const perform = (dispatch) => ({
|
|
doToast: (props) => dispatch(doToast(props)),
|
|
});
|
|
|
|
export default connect(select, perform)(ClaimPreviewReset);
|