lbry-desktop/ui/js/page/channel/index.js
2017-05-21 10:42:34 -04:00

30 lines
708 B
JavaScript

import React from 'react'
import {
connect
} from 'react-redux'
import {
doFetchClaimsByChannel
} from 'actions/content'
import {
makeSelectClaimForUri,
makeSelectClaimsInChannelForUri
} from 'selectors/claims'
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
}
const perform = (dispatch) => ({
fetchClaims: (uri) => dispatch(doFetchClaimsByChannel(uri))
})
export default connect(makeSelect, perform)(ChannelPage)