lbry-desktop/ui/component/downloadProgress/index.js
2021-10-01 13:00:57 -07:00

16 lines
549 B
JavaScript
Executable file

import { connect } from 'react-redux';
import DownloadProgress from './view';
import { doSetPlayingUri, doStopDownload } from 'redux/actions/content';
const select = (state) => {
// console.log('DownloadProgress select state', state.fileInfo);
return {
downloadList: state.fileInfo.byOutpoint,
};
};
const perform = (dispatch) => ({
pause: () => dispatch(doSetPlayingUri({ uri: null })),
stopDownload: (outpoint, sd_hash) => dispatch(doStopDownload(outpoint, sd_hash)),
});
export default connect(select, perform)(DownloadProgress);