lbry-desktop/src/renderer/component/fileActions/index.js

25 lines
683 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2018-04-18 06:03:01 +02:00
import {
makeSelectCostInfoForUri,
makeSelectFileInfoForUri,
makeSelectClaimIsMine,
doOpenModal,
2018-04-18 06:03:01 +02:00
} from 'lbry-redux';
import FileActions from './view';
2017-09-08 05:15:05 +02:00
const select = (state, props) => ({
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
2017-12-13 22:36:30 +01:00
/* availability check is disabled due to poor performance, TBD if it dies forever or requires daemon fix */
2017-09-08 05:15:05 +02:00
costInfo: makeSelectCostInfoForUri(props.uri)(state),
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
});
2017-06-06 06:21:55 +02:00
const perform = dispatch => ({
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
2017-06-06 06:21:55 +02:00
});
2018-10-31 17:40:17 +01:00
export default connect(
select,
perform
)(FileActions);