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

29 lines
659 B
JavaScript
Raw Normal View History

import React from 'react'
import {
connect,
} from 'react-redux'
2017-05-12 19:14:06 +02:00
import {
doFetchCostInfoForUri,
} from 'actions/cost_info'
import {
makeSelectCostInfoForUri,
} from 'selectors/cost_info'
import FilePrice from './view'
const makeSelect = () => {
const selectCostInfoForUri = makeSelectCostInfoForUri()
const select = (state, props) => ({
costInfo: selectCostInfoForUri(state, props),
})
return select
}
const perform = (dispatch) => ({
2017-05-15 18:34:33 +02:00
fetchCostInfo: (uri) => dispatch(doFetchCostInfoForUri(uri)),
// cancelFetchCostInfo: (uri) => dispatch(doCancelFetchCostInfoForUri(uri))
})
export default connect(makeSelect, perform)(FilePrice)