lbry-desktop/ui/component/claimPreviewProgress/index.js

15 lines
515 B
JavaScript
Raw Normal View History

2022-04-01 16:56:18 +02:00
import { connect } from 'react-redux';
import { selectClaimForUri } from 'redux/selectors/claims';
import { selectContentPositionForUri } from 'redux/selectors/content';
import ClaimPreviewProgress from './view';
const select = (state, props) => {
const claim = selectClaimForUri(state, props.uri);
return {
position: selectContentPositionForUri(state, props.uri),
duration: claim?.value?.video?.duration || claim?.value?.audio?.duration,
};
};
export default connect(select)(ClaimPreviewProgress);