handle fetching state on downloads and publishes pages #1593

Merged
daovist merged 5 commits from downloads-pending into master 2018-07-18 20:56:32 +02:00
2 changed files with 5 additions and 9 deletions
Showing only changes of commit 49700d5906 - Show all commits

View file

@ -13,13 +13,11 @@ type Props = {
class FileListDownloaded extends React.PureComponent<Props> {
render() {
const { fetching, fileInfos, navigate } = this.props;
const hasDownloads = fileInfos && fileInfos.length > 0;
const hasDownloads = fileInfos && Object.values(fileInfos).length > 0;
return (
<Page notContained>
{fetching ? (
<div className="card__actions card__actions--center">Fetching content...</div>
) : hasDownloads ? (
<Page notContained loading={fetching}>
{hasDownloads ? (
<FileList fileInfos={fileInfos} />
) : (
<div className="page__empty">

View file

@ -24,10 +24,8 @@ class FileListPublished extends React.PureComponent<Props> {
const { fetching, claims, navigate } = this.props;
return (
<Page notContained>
{fetching ? (
<div className="card__actions card__actions--center">Fetching content...</div>
) : claims.length ? (
<Page notContained loading={fetching}>
{claims && claims.length ? (
<FileList checkPending fileInfos={claims} sortByHeight />
) : (
<div className="page__empty">