lbry-desktop/ui/page/embedWrapper/index.js
Jeremy Kauffman 793f622d8d semi-broken
2020-04-29 11:00:42 -04:00

22 lines
598 B
JavaScript

import { connect } from 'react-redux';
import EmbedWrapperPage from './view';
import { doResolveUri, makeSelectClaimForUri, buildURI } from 'lbry-redux';
const select = (state, props) => {
const { match } = props;
const { params } = match;
const { claimName, claimId } = params;
const uri = claimName && claimId ? buildURI({ claimName, claimId }) : '';
return {
uri,
claim: makeSelectClaimForUri(uri)(state),
};
};
const perform = dispatch => {
return {
resolveUri: uri => dispatch(doResolveUri(uri)),
};
};
export default connect(select, perform)(EmbedWrapperPage);