import { connect } from 'react-redux'; import { selectIsFetchingClaimListMine, makeSelectMyStreamUrisForPage, selectMyStreamUrisCount } from 'lbry-redux'; import { doCheckPendingPublishesApp } from 'redux/actions/publish'; import FileListPublished from './view'; import { withRouter } from 'react-router'; 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), }; }; const perform = dispatch => ({ checkPendingPublishes: () => dispatch(doCheckPendingPublishesApp()), }); export default withRouter( connect( select, perform )(FileListPublished) );