Uploads: show placeholder when loading
This commit is contained in:
parent
243cd0dffd
commit
79f05a831f
2 changed files with 13 additions and 3 deletions
|
@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
|
|
||||||
## [Unreleased for Desktop]
|
## [Unreleased for Desktop]
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Uploads: show placeholder when loading page _community pr!_ ([#7531](https://github.com/lbryio/lbry-desktop/pull/7531))
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
## [0.52.6] - [2022-04-04]
|
## [0.52.6] - [2022-04-04]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -4,6 +4,7 @@ import * as ICONS from 'constants/icons';
|
||||||
import React, { useEffect } from 'react';
|
import React, { useEffect } from 'react';
|
||||||
import Button from 'component/button';
|
import Button from 'component/button';
|
||||||
import ClaimList from 'component/claimList';
|
import ClaimList from 'component/claimList';
|
||||||
|
import ClaimPreview from 'component/claimPreview';
|
||||||
import Page from 'component/page';
|
import Page from 'component/page';
|
||||||
import Paginate from 'component/common/paginate';
|
import Paginate from 'component/common/paginate';
|
||||||
import { PAGE_PARAM, PAGE_SIZE_PARAM } from 'constants/claim';
|
import { PAGE_PARAM, PAGE_SIZE_PARAM } from 'constants/claim';
|
||||||
|
@ -87,7 +88,6 @@ function FileListPublished(props: Props) {
|
||||||
}
|
}
|
||||||
headerAltControls={
|
headerAltControls={
|
||||||
<div className="card__actions--inline">
|
<div className="card__actions--inline">
|
||||||
{fetching && <Spinner type="small" />}
|
|
||||||
{!fetching && (
|
{!fetching && (
|
||||||
<Button
|
<Button
|
||||||
button="alt"
|
button="alt"
|
||||||
|
@ -106,8 +106,11 @@ function FileListPublished(props: Props) {
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
persistedStorageKey="claim-list-published"
|
persistedStorageKey="claim-list-published"
|
||||||
uris={urls}
|
uris={fetching ? [] : urls}
|
||||||
|
loading={fetching}
|
||||||
/>
|
/>
|
||||||
|
{fetching &&
|
||||||
|
new Array(Number(pageSize)).fill(1).map((x, i) => <ClaimPreview key={i} placeholder="loading" />)}
|
||||||
<Paginate totalPages={urlTotal > 0 ? Math.ceil(urlTotal / Number(pageSize)) : 1} />
|
<Paginate totalPages={urlTotal > 0 ? Math.ceil(urlTotal / Number(pageSize)) : 1} />
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Reference in a new issue