fileListPublished was not refreshing on page load

This commit is contained in:
jessop 2019-10-16 18:03:11 -04:00 committed by Sean Yesmunt
parent 005aad6fdb
commit ff702e480a
2 changed files with 11 additions and 3 deletions

View file

@ -1,5 +1,10 @@
import { connect } from 'react-redux';
import { selectIsFetchingClaimListMine, makeSelectMyStreamUrlsForPage, selectMyStreamUrlsCount } from 'lbry-redux';
import {
selectIsFetchingClaimListMine,
makeSelectMyStreamUrlsForPage,
selectMyStreamUrlsCount,
doFetchClaimListMine,
} from 'lbry-redux';
import { doCheckPendingPublishesApp } from 'redux/actions/publish';
import FileListPublished from './view';
import { withRouter } from 'react-router';
@ -18,6 +23,7 @@ const select = (state, props) => {
const perform = dispatch => ({
checkPendingPublishes: () => dispatch(doCheckPendingPublishesApp()),
fetchClaimListMine: () => dispatch(doFetchClaimListMine()),
});
export default withRouter(

View file

@ -8,6 +8,7 @@ import { PAGE_SIZE } from 'constants/claim';
type Props = {
checkPendingPublishes: () => void,
fetchClaimListMine: () => void,
fetching: boolean,
urls: Array<string>,
urlTotal: ?number,
@ -16,10 +17,11 @@ type Props = {
};
function FileListPublished(props: Props) {
const { checkPendingPublishes, fetching, urls, urlTotal } = props;
const { checkPendingPublishes, fetchClaimListMine, fetching, urls, urlTotal } = props;
useEffect(() => {
checkPendingPublishes();
}, [checkPendingPublishes]);
fetchClaimListMine();
}, [checkPendingPublishes, fetchClaimListMine]);
return (
<Page notContained>