Do not throw error when trying to play empty collections.
This commit is contained in:
parent
3671e855cb
commit
de825fd4dc
3 changed files with 6 additions and 3 deletions
|
@ -57,6 +57,9 @@ function CollectionActions(props: Props) {
|
|||
|
||||
const doPlay = React.useCallback(
|
||||
(playUri) => {
|
||||
if (!playUri) {
|
||||
return;
|
||||
}
|
||||
const navigateUrl = formatLbryUrlForWeb(playUri);
|
||||
push({
|
||||
pathname: navigateUrl,
|
||||
|
|
|
@ -33,7 +33,7 @@ function CollectionPreviewOverlay(props: Props) {
|
|||
collectionItemUrls.map((item, index) => {
|
||||
if (index < 2) {
|
||||
return (
|
||||
<div className="collection-preview__overlay-grid-items">
|
||||
<div key={item} className="collection-preview__overlay-grid-items">
|
||||
<FileThumbnail uri={item} key={item} />
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -95,7 +95,7 @@ export default function CollectionsListMine(props: Props) {
|
|||
{builtin.map((list: Collection) => {
|
||||
const { items: itemUrls } = list;
|
||||
return (
|
||||
<>
|
||||
<React.Fragment key={list.name}>
|
||||
{Boolean(itemUrls && itemUrls.length) && (
|
||||
<div className="claim-grid__wrapper" key={list.name}>
|
||||
<h1 className="claim-grid__header">
|
||||
|
@ -124,7 +124,7 @@ export default function CollectionsListMine(props: Props) {
|
|||
<ClaimList tileLayout key={list.name} uris={itemUrls.slice(0, 6)} collectionId={list.id} />
|
||||
</div>
|
||||
)}
|
||||
</>
|
||||
</React.Fragment>
|
||||
);
|
||||
})}
|
||||
<div className="claim-grid__wrapper">
|
||||
|
|
Loading…
Reference in a new issue