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

27 lines
710 B
JavaScript
Raw Normal View History

2017-06-06 23:19:12 +02:00
import React from "react";
import { connect } from "react-redux";
import { doFetchClaimsByChannel } from "actions/content";
2017-05-13 00:50:51 +02:00
import {
makeSelectClaimForUri,
2017-06-06 23:19:12 +02:00
makeSelectClaimsInChannelForUri,
} from "selectors/claims";
import ChannelPage from "./view";
const makeSelect = () => {
const selectClaim = makeSelectClaimForUri(),
2017-06-06 23:19:12 +02:00
selectClaimsInChannel = makeSelectClaimsInChannelForUri();
const select = (state, props) => ({
claim: selectClaim(state, props),
2017-06-06 23:19:12 +02:00
claimsInChannel: selectClaimsInChannel(state, props),
});
2017-06-06 23:19:12 +02:00
return select;
2017-06-06 06:21:55 +02:00
};
2017-05-04 05:44:08 +02:00
2017-06-06 06:21:55 +02:00
const perform = dispatch => ({
2017-06-06 23:19:12 +02:00
fetchClaims: uri => dispatch(doFetchClaimsByChannel(uri)),
2017-06-06 06:21:55 +02:00
});
2017-05-04 05:44:08 +02:00
2017-06-06 06:21:55 +02:00
export default connect(makeSelect, perform)(ChannelPage);