2017-10-10 01:19:50 +02:00
|
|
|
import React from "react";
|
|
|
|
import { connect } from "react-redux";
|
2017-11-13 22:02:23 +01:00
|
|
|
import { makeSelectClaimForUri } from "redux/selectors/claims";
|
|
|
|
import { doNavigate } from "redux/actions/navigation";
|
|
|
|
import { doResolveUri } from "redux/actions/content";
|
|
|
|
import { makeSelectTotalItemsForChannel } from "redux/selectors/content";
|
|
|
|
import { makeSelectIsUriResolving } from "redux/selectors/content";
|
2017-10-10 01:19:50 +02:00
|
|
|
import ChannelTile from "./view";
|
|
|
|
|
|
|
|
const select = (state, props) => ({
|
|
|
|
claim: makeSelectClaimForUri(props.uri)(state),
|
2017-10-12 15:37:24 +02:00
|
|
|
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)),
|
2017-10-12 15:37:24 +02:00
|
|
|
resolveUri: uri => dispatch(doResolveUri(uri)),
|
2017-10-10 01:19:50 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export default connect(select, perform)(ChannelTile);
|