lbry-desktop/ui/js/page/channel/index.js

31 lines
708 B
JavaScript
Raw Normal View History

2017-05-04 05:44:08 +02:00
import React from 'react'
import {
connect
} from 'react-redux'
import {
2017-05-15 05:50:59 +02:00
doFetchClaimsByChannel
2017-05-13 00:50:51 +02:00
} from 'actions/content'
import {
makeSelectClaimForUri,
makeSelectClaimsInChannelForUri
2017-05-13 00:50:51 +02:00
} from 'selectors/claims'
2017-05-04 05:44:08 +02:00
import ChannelPage from './view'
const makeSelect = () => {
const selectClaim = makeSelectClaimForUri(),
selectClaimsInChannel = makeSelectClaimsInChannelForUri()
const select = (state, props) => ({
claim: selectClaim(state, props),
claimsInChannel: selectClaimsInChannel(state, props)
})
return select
}
2017-05-04 05:44:08 +02:00
const perform = (dispatch) => ({
2017-05-15 05:50:59 +02:00
fetchClaims: (uri) => dispatch(doFetchClaimsByChannel(uri))
2017-05-04 05:44:08 +02:00
})
export default connect(makeSelect, perform)(ChannelPage)