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