lbry-desktop/ui/js/component/channelTile/index.js

22 lines
809 B
JavaScript
Raw Normal View History

2017-10-10 01:19:50 +02:00
import React from "react";
import { connect } from "react-redux";
import { makeSelectClaimForUri } from "selectors/claims";
import { doNavigate } from "actions/navigation";
import { doResolveUri } from "actions/content";
2017-10-10 01:19:50 +02:00
import { makeSelectTotalItemsForChannel } from "selectors/content";
import { makeSelectIsUriResolving } from "selectors/content";
2017-10-10 01:19:50 +02:00
import ChannelTile from "./view";
const select = (state, props) => ({
claim: makeSelectClaimForUri(props.uri)(state),
isResolvingUri: makeSelectIsUriResolving(props.uri)(state),
2017-10-10 01:19:50 +02:00
totalItems: makeSelectTotalItemsForChannel(props.uri)(state),
});
const perform = dispatch => ({
navigate: (path, params) => dispatch(doNavigate(path, params)),
resolveUri: uri => dispatch(doResolveUri(uri)),
2017-10-10 01:19:50 +02:00
});
export default connect(select, perform)(ChannelTile);