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

33 lines
703 B
JavaScript
Raw Normal View History

import React from 'react'
import {
connect
} from 'react-redux'
2017-05-10 05:06:48 +02:00
import {
doResolveUri,
} from 'actions/content'
import {
2017-05-15 05:50:59 +02:00
makeSelectClaimForUri,
} from 'selectors/claims'
import {
2017-05-15 05:50:59 +02:00
makeSelectIsResolvingForUri,
2017-05-10 05:06:48 +02:00
} from 'selectors/content'
import ShowPage from './view'
2017-05-15 05:50:59 +02:00
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))
})
2017-05-15 05:50:59 +02:00
export default connect(makeSelect, perform)(ShowPage)