lbry-desktop/src/ui/page/fileListPublished/index.js

29 lines
856 B
JavaScript
Raw Normal View History

import { connect } from 'react-redux';
2019-09-23 19:32:38 +02:00
import { selectIsFetchingClaimListMine, makeSelectMyStreamUrisForPage, selectMyStreamUrisCount } from 'lbry-redux';
2019-07-13 04:59:45 +02:00
import { doCheckPendingPublishesApp } from 'redux/actions/publish';
import FileListPublished from './view';
2019-09-23 19:32:38 +02:00
import { withRouter } from 'react-router';
2019-09-23 19:32:38 +02:00
const select = (state, props) => {
const { search } = props.location;
const urlParams = new URLSearchParams(search);
const page = Number(urlParams.get('page')) || 0;
return {
page,
uris: makeSelectMyStreamUrisForPage(page)(state),
uriTotal: selectMyStreamUrisCount(state),
fetching: selectIsFetchingClaimListMine(state),
};
};
2017-06-06 06:21:55 +02:00
const perform = dispatch => ({
2019-07-13 04:59:45 +02:00
checkPendingPublishes: () => dispatch(doCheckPendingPublishesApp()),
2017-06-06 06:21:55 +02:00
});
2019-09-23 19:32:38 +02:00
export default withRouter(
connect(
select,
perform
)(FileListPublished)
);