lbry-desktop/ui/component/claimPreviewReset/index.js
Thomas Zarebczan 8144a9bb87 livestream new api
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
2022-04-20 15:53:28 -04:00

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);