2017-04-29 19:02:25 +02:00
|
|
|
import React from 'react'
|
|
|
|
import {
|
|
|
|
connect,
|
|
|
|
} from 'react-redux'
|
2017-05-12 19:14:06 +02:00
|
|
|
import {
|
|
|
|
doFetchCostInfoForUri,
|
|
|
|
} from 'actions/cost_info'
|
2017-04-29 19:02:25 +02:00
|
|
|
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)),
|
2017-05-17 23:52:45 +02:00
|
|
|
// cancelFetchCostInfo: (uri) => dispatch(doCancelFetchCostInfoForUri(uri))
|
2017-04-29 19:02:25 +02:00
|
|
|
})
|
|
|
|
|
|
|
|
export default connect(makeSelect, perform)(FilePrice)
|