mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-08-23 17:47:24 +00:00
27 lines
813 B
JavaScript
27 lines
813 B
JavaScript
import React from 'react';
|
|
import { connect } from 'react-redux';
|
|
import { doFetchCostInfoForUri } from 'actions/cost_info';
|
|
import {
|
|
makeSelectCostInfoForUri,
|
|
makeSelectFetchingCostInfoForUri
|
|
} from 'selectors/cost_info';
|
|
import FilePrice from './view';
|
|
|
|
const makeSelect = () => {
|
|
const selectCostInfoForUri = makeSelectCostInfoForUri();
|
|
const selectFetchingCostInfoForUri = makeSelectFetchingCostInfoForUri();
|
|
|
|
const select = (state, props) => ({
|
|
costInfo: selectCostInfoForUri(state, props),
|
|
fetching: selectFetchingCostInfoForUri(state, props)
|
|
});
|
|
|
|
return select;
|
|
};
|
|
|
|
const perform = dispatch => ({
|
|
fetchCostInfo: uri => dispatch(doFetchCostInfoForUri(uri))
|
|
// cancelFetchCostInfo: (uri) => dispatch(doCancelFetchCostInfoForUri(uri))
|
|
});
|
|
|
|
export default connect(makeSelect, perform)(FilePrice);
|