2020-04-29 22:50:06 +02:00
|
|
|
import { connect } from 'react-redux';
|
2022-01-20 02:46:01 +01:00
|
|
|
import { selectThumbnailForUri, makeSelectClaimForUri } from 'redux/selectors/claims';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { doResolveUri } from 'redux/actions/claims';
|
|
|
|
import * as SETTINGS from 'constants/settings';
|
2022-01-20 02:46:01 +01:00
|
|
|
import { doFetchCostInfoForUri, selectCostInfoForUri } from 'lbryinc';
|
2020-10-20 19:10:02 +02:00
|
|
|
import { doPlayUri, doSetPlayingUri } from 'redux/actions/content';
|
2020-05-21 18:53:21 +02:00
|
|
|
import { doAnaltyicsPurchaseEvent } from 'redux/actions/app';
|
2020-04-29 22:50:06 +02:00
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
2020-10-20 19:10:02 +02:00
|
|
|
import { makeSelectFileRenderModeForUri } from 'redux/selectors/content';
|
|
|
|
|
2020-04-29 22:50:06 +02:00
|
|
|
import ChannelThumbnail from './view';
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
2022-01-20 02:46:01 +01:00
|
|
|
thumbnail: selectThumbnailForUri(state, props.uri),
|
2020-04-29 22:50:06 +02:00
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
floatingPlayerEnabled: makeSelectClientSetting(SETTINGS.FLOATING_PLAYER)(state),
|
2022-01-20 02:46:01 +01:00
|
|
|
costInfo: selectCostInfoForUri(state, props.uri),
|
2020-10-20 19:10:02 +02:00
|
|
|
renderMode: makeSelectFileRenderModeForUri(props.uri)(state),
|
2020-04-29 22:50:06 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, {
|
|
|
|
doResolveUri,
|
|
|
|
doFetchCostInfoForUri,
|
2020-04-30 20:25:51 +02:00
|
|
|
doPlayUri,
|
2020-10-20 19:10:02 +02:00
|
|
|
doSetPlayingUri,
|
2020-05-21 18:53:21 +02:00
|
|
|
doAnaltyicsPurchaseEvent,
|
2020-04-29 22:50:06 +02:00
|
|
|
})(ChannelThumbnail);
|