Redux persist #225
4 changed files with 5 additions and 10 deletions
|
@ -102,12 +102,7 @@ export function doFetchFileInfosAndPublishedClaims() {
|
||||||
isClaimListMinePending = selectClaimListMineIsPending(state),
|
isClaimListMinePending = selectClaimListMineIsPending(state),
|
||||||
isFileInfoListPending = selectFileListIsPending(state);
|
isFileInfoListPending = selectFileListIsPending(state);
|
||||||
|
|
||||||
if (isClaimListMinePending === undefined) {
|
|
||||||
dispatch(doFetchClaimListMine());
|
dispatch(doFetchClaimListMine());
|
||||||
}
|
|
||||||
|
|
||||||
if (isFileInfoListPending === undefined) {
|
|
||||||
dispatch(doFileList());
|
dispatch(doFileList());
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ class FileList extends React.PureComponent {
|
||||||
});
|
});
|
||||||
return (
|
return (
|
||||||
<section className="file-list__header">
|
<section className="file-list__header">
|
||||||
{fetching && <span className="busy-indicator" />}
|
{fetching && <BusyMessage />}
|
||||||
<span className="sort-section">
|
<span className="sort-section">
|
||||||
{__("Sort by")} {" "}
|
{__("Sort by")} {" "}
|
||||||
<FormField type="select" onChange={this.handleSortChanged.bind(this)}>
|
<FormField type="select" onChange={this.handleSortChanged.bind(this)}>
|
||||||
|
|
|
@ -12,7 +12,7 @@ import SubHeader from "component/subHeader";
|
||||||
|
|
||||||
class FileListDownloaded extends React.PureComponent {
|
class FileListDownloaded extends React.PureComponent {
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
this.props.fetchFileInfosDownloaded();
|
if (!this.props.isPending) this.props.fetchFileInfosDownloaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
|
|
|
@ -12,7 +12,7 @@ import SubHeader from "component/subHeader";
|
||||||
|
|
||||||
class FileListPublished extends React.PureComponent {
|
class FileListPublished extends React.PureComponent {
|
||||||
componentWillMount() {
|
componentWillMount() {
|
||||||
this.props.fetchFileListPublished();
|
if (!this.props.isPending) this.props.fetchFileListPublished();
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate() {
|
componentDidUpdate() {
|
||||||
|
|
Loading…
Reference in a new issue