lbry-desktop/ui/component/claimPreviewProgress/index.js
2022-04-01 15:37:26 -04:00

14 lines
515 B
JavaScript

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