2020-11-02 17:51:08 +01:00
|
|
|
import { connect } from 'react-redux';
|
2021-10-08 05:47:39 +02:00
|
|
|
import { doResolveUri } from 'redux/actions/claims';
|
|
|
|
import { makeSelectClaimForUri } from 'redux/selectors/claims';
|
2022-04-22 05:00:57 +02:00
|
|
|
import { makeSelectContentWatchedPercentageForUri } from 'redux/selectors/content';
|
2017-12-21 22:08:54 +01:00
|
|
|
import CardMedia from './view';
|
2022-04-22 05:00:57 +02:00
|
|
|
import { makeSelectClientSetting } from 'redux/selectors/settings';
|
|
|
|
import * as SETTINGS from 'constants/settings';
|
2017-07-14 01:18:28 +02:00
|
|
|
|
2022-04-22 05:00:57 +02:00
|
|
|
const select = (state, props) => {
|
|
|
|
return {
|
|
|
|
watchedPercentage: makeSelectContentWatchedPercentageForUri(props.uri)(state),
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
|
|
|
showPercentage: makeSelectClientSetting(SETTINGS.PERSIST_WATCH_TIME)(state),
|
|
|
|
};
|
|
|
|
};
|
2020-11-02 17:51:08 +01:00
|
|
|
|
|
|
|
export default connect(select, { doResolveUri })(CardMedia);
|