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

22 lines
671 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2018-04-18 06:03:01 +02:00
import {
makeSelectCostInfoForUri,
makeSelectFileInfoForUri,
makeSelectClaimIsMine,
2018-04-19 18:51:18 +02:00
doNotify,
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 => ({
2018-04-19 18:51:18 +02:00
openModal: (modal, props) => dispatch(doNotify(modal, props)),
2017-06-06 06:21:55 +02:00
});
2017-09-08 05:15:05 +02:00
export default connect(select, perform)(FileActions);