872259b73a
* am I done? * post diff * unused selector cleanup * missed commit * mess with button styles * fix flow Co-authored-by: Jeremy Kauffman <jeremy@lbry.io> Co-authored-by: Sean Yesmunt <sean@lbry.io>
25 lines
977 B
JavaScript
25 lines
977 B
JavaScript
import { connect } from 'react-redux';
|
|
import { makeSelectFileInfoForUri } from 'lbry-redux';
|
|
import { doClaimEligiblePurchaseRewards } from 'lbryinc';
|
|
import {
|
|
makeSelectFileRenderModeForUri,
|
|
makeSelectIsPlaying,
|
|
makeSelectStreamingUrlForUriWebProxy,
|
|
} from 'redux/selectors/content';
|
|
import { withRouter } from 'react-router';
|
|
import { doAnalyticsView } from 'redux/actions/app';
|
|
import FileRenderInline from './view';
|
|
|
|
const select = (state, props) => ({
|
|
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
|
|
isPlaying: makeSelectIsPlaying(props.uri)(state),
|
|
streamingUrl: makeSelectStreamingUrlForUriWebProxy(props.uri)(state),
|
|
renderMode: makeSelectFileRenderModeForUri(props.uri)(state),
|
|
});
|
|
|
|
const perform = dispatch => ({
|
|
triggerAnalyticsView: (uri, timeToStart) => dispatch(doAnalyticsView(uri, timeToStart)),
|
|
claimRewards: () => dispatch(doClaimEligiblePurchaseRewards()),
|
|
});
|
|
|
|
export default withRouter(connect(select, perform)(FileRenderInline));
|