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

22 lines
736 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2019-03-12 20:53:55 +01:00
import { makeSelectFileInfoForUri, makeSelectClaimIsMine } from 'lbry-redux';
import { makeSelectCostInfoForUri } from 'lbryinc';
2018-11-27 18:00:45 +01:00
import { doOpenModal } from 'redux/actions/app';
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);