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