2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2018-04-18 06:03:01 +02:00
|
|
|
import {
|
|
|
|
makeSelectCostInfoForUri,
|
|
|
|
makeSelectFileInfoForUri,
|
|
|
|
makeSelectClaimIsMine,
|
2018-10-29 18:23:53 +01:00
|
|
|
doOpenModal,
|
2018-04-18 06:03:01 +02:00
|
|
|
} from 'lbry-redux';
|
2017-12-21 22:08:54 +01:00
|
|
|
import FileActions from './view';
|
2017-04-29 11:50:29 +02:00
|
|
|
|
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-04-29 11:50:29 +02:00
|
|
|
|
2017-06-06 06:21:55 +02:00
|
|
|
const perform = dispatch => ({
|
2018-10-29 18:23:53 +01:00
|
|
|
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
|
2017-06-06 06:21:55 +02:00
|
|
|
});
|
2017-04-29 19:02:25 +02:00
|
|
|
|
2018-10-31 17:40:17 +01:00
|
|
|
export default connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(FileActions);
|