2017-06-06 17:19:12 -04:00
|
|
|
import React from "react";
|
|
|
|
import { connect } from "react-redux";
|
2017-06-29 14:58:15 +07:00
|
|
|
import { doFetchFeaturedUris, doCancelAllResolvingUris } from "actions/content";
|
2017-04-23 16:56:50 +07:00
|
|
|
import {
|
2017-05-07 14:39:13 +07:00
|
|
|
selectFeaturedUris,
|
|
|
|
selectFetchingFeaturedUris,
|
2017-06-06 17:19:12 -04:00
|
|
|
} from "selectors/content";
|
|
|
|
import DiscoverPage from "./view";
|
2017-04-23 16:56:50 +07:00
|
|
|
|
2017-06-05 21:21:55 -07:00
|
|
|
const select = state => ({
|
2017-05-03 23:44:08 -04:00
|
|
|
featuredUris: selectFeaturedUris(state),
|
2017-05-07 14:39:13 +07:00
|
|
|
fetchingFeaturedUris: selectFetchingFeaturedUris(state),
|
2017-06-05 21:21:55 -07:00
|
|
|
});
|
2017-04-23 16:56:50 +07:00
|
|
|
|
2017-06-05 21:21:55 -07:00
|
|
|
const perform = dispatch => ({
|
2017-06-06 17:19:12 -04:00
|
|
|
fetchFeaturedUris: () => dispatch(doFetchFeaturedUris()),
|
2017-06-29 14:58:15 +07:00
|
|
|
cancelResolvingUris: () => dispatch(doCancelAllResolvingUris()),
|
2017-06-05 21:21:55 -07:00
|
|
|
});
|
2017-04-23 16:56:50 +07:00
|
|
|
|
2017-06-05 21:21:55 -07:00
|
|
|
export default connect(select, perform)(DiscoverPage);
|