lbry-desktop/ui/js/page/showPage/index.js
2017-05-14 23:50:59 -04:00

32 lines
703 B
JavaScript

import React from 'react'
import {
connect
} from 'react-redux'
import {
doResolveUri,
} from 'actions/content'
import {
makeSelectClaimForUri,
} from 'selectors/claims'
import {
makeSelectIsResolvingForUri,
} from 'selectors/content'
import ShowPage from './view'
const makeSelect = () => {
const selectClaim = makeSelectClaimForUri(),
selectIsResolving = makeSelectIsResolvingForUri();
const select = (state, props) => ({
claim: selectClaim(state, props),
isResolvingUri: selectIsResolving(state, props)
})
return select
}
const perform = (dispatch) => ({
resolveUri: (uri) => dispatch(doResolveUri(uri))
})
export default connect(makeSelect, perform)(ShowPage)