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