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

21 lines
805 B
JavaScript
Raw Normal View History

2017-06-06 23:19:12 +02:00
import React from "react";
import { connect } from "react-redux";
2017-09-08 05:15:05 +02:00
import { makeSelectFileInfoForUri } from "selectors/file_info";
2017-06-06 23:19:12 +02:00
import { makeSelectCostInfoForUri } from "selectors/cost_info";
2017-09-07 23:18:33 +02:00
import { doOpenModal } from "actions/app";
2017-09-08 05:15:05 +02:00
import { makeSelectClaimIsMine } from "selectors/claims";
2017-06-06 23:19:12 +02:00
import FileActions from "./view";
2017-09-08 05:15:05 +02:00
const select = (state, props) => ({
fileInfo: makeSelectFileInfoForUri(props.uri)(state),
/*availability check is disabled due to poor performance, TBD if it dies forever or requires daemon fix*/
costInfo: makeSelectCostInfoForUri(props.uri)(state),
claimIsMine: makeSelectClaimIsMine(props.uri)(state),
});
2017-06-06 06:21:55 +02:00
const perform = dispatch => ({
2017-09-08 05:15:05 +02:00
openModal: (modal, props) => dispatch(doOpenModal(modal, props)),
2017-06-06 06:21:55 +02:00
});
2017-09-08 05:15:05 +02:00
export default connect(select, perform)(FileActions);