2017-12-21 22:08:54 +01:00
|
|
|
import { connect } from 'react-redux';
|
2019-10-17 00:03:11 +02:00
|
|
|
import {
|
|
|
|
selectIsFetchingClaimListMine,
|
|
|
|
makeSelectMyStreamUrlsForPage,
|
|
|
|
selectMyStreamUrlsCount,
|
2020-01-08 06:29:01 +01:00
|
|
|
doClearPublish,
|
2019-10-17 00:03:11 +02:00
|
|
|
doFetchClaimListMine,
|
|
|
|
} from 'lbry-redux';
|
2019-07-13 04:59:45 +02:00
|
|
|
import { doCheckPendingPublishesApp } from 'redux/actions/publish';
|
2017-12-21 22:08:54 +01:00
|
|
|
import FileListPublished from './view';
|
2019-09-23 19:32:38 +02:00
|
|
|
import { withRouter } from 'react-router';
|
2017-04-23 18:10:45 +02:00
|
|
|
|
2019-09-23 19:32:38 +02:00
|
|
|
const select = (state, props) => {
|
|
|
|
const { search } = props.location;
|
|
|
|
const urlParams = new URLSearchParams(search);
|
2019-09-25 23:17:23 +02:00
|
|
|
const page = Number(urlParams.get('page')) || 1;
|
2019-09-23 19:32:38 +02:00
|
|
|
return {
|
|
|
|
page,
|
2019-09-25 23:37:01 +02:00
|
|
|
urls: makeSelectMyStreamUrlsForPage(page)(state),
|
|
|
|
urlTotal: selectMyStreamUrlsCount(state),
|
2019-09-23 19:32:38 +02:00
|
|
|
fetching: selectIsFetchingClaimListMine(state),
|
|
|
|
};
|
|
|
|
};
|
2017-05-01 06:51:19 +02:00
|
|
|
|
2017-06-06 06:21:55 +02:00
|
|
|
const perform = dispatch => ({
|
2019-07-13 04:59:45 +02:00
|
|
|
checkPendingPublishes: () => dispatch(doCheckPendingPublishesApp()),
|
2019-10-17 00:03:11 +02:00
|
|
|
fetchClaimListMine: () => dispatch(doFetchClaimListMine()),
|
2020-01-08 06:29:01 +01:00
|
|
|
clearPublish: () => dispatch(doClearPublish()),
|
2017-06-06 06:21:55 +02:00
|
|
|
});
|
2017-05-01 06:51:19 +02:00
|
|
|
|
2020-03-09 15:46:12 +01:00
|
|
|
export default withRouter(
|
|
|
|
connect(
|
|
|
|
select,
|
|
|
|
perform
|
|
|
|
)(FileListPublished)
|
|
|
|
);
|