lbry-desktop/ui/component/collectionPreviewOverlay/view.jsx
infinite-persistence d97a23b699 Rename default import/exports for clarity in text search (no functional change)
I believe it was just due to copy/pasting from another file and not renaming it.
2021-07-09 08:40:26 +08:00

42 lines
1.1 KiB
JavaScript

// @flow
import React from 'react';
import { withRouter } from 'react-router-dom';
import FileThumbnail from 'component/fileThumbnail';
type Props = {
uri: string,
collectionId: string,
collectionName: string,
collectionCount: number,
editedCollection?: Collection,
pendingCollection?: Collection,
claim: ?Claim,
collectionItemUrls: Array<string>,
};
function CollectionPreviewOverlay(props: Props) {
const { collectionItemUrls } = props;
if (collectionItemUrls && collectionItemUrls.length > 0) {
return (
<div className="collection-preview__overlay-thumbs">
<div className="collection-preview__overlay-side" />
<div className="collection-preview__overlay-grid">
{collectionItemUrls &&
collectionItemUrls.map((item, index) => {
if (index < 2) {
return (
<div className="collection-preview__overlay-grid-items">
<FileThumbnail uri={item} key={item} />
</div>
);
}
})}
</div>
</div>
);
}
return null;
}
export default withRouter(CollectionPreviewOverlay);