2021-01-05 05:25:08 +00:00
|
|
|
import React from 'react';
|
2021-01-06 07:17:56 +00:00
|
|
|
import { Button, Card, Modal } from 'react-bootstrap';
|
|
|
|
import CollectionDropZone from './CollectionDropZone';
|
2021-01-05 05:25:08 +00:00
|
|
|
|
2021-01-05 11:14:19 +00:00
|
|
|
function CollectionSelector({
|
|
|
|
modalView,
|
|
|
|
closeModal,
|
|
|
|
collectionLatestFile,
|
|
|
|
showProgress,
|
|
|
|
}) {
|
2021-01-06 07:46:02 +00:00
|
|
|
const CollectionIcons = collectionLatestFile?.map((item) => (
|
2021-01-06 07:17:56 +00:00
|
|
|
<CollectionDropZone key={item.collectionID}
|
2021-01-05 10:32:13 +00:00
|
|
|
closeModal={closeModal}
|
|
|
|
collectionLatestFile={item}
|
|
|
|
noDragEventsBubbling
|
2021-01-05 11:14:19 +00:00
|
|
|
showProgress={showProgress}
|
2021-01-05 10:32:13 +00:00
|
|
|
>
|
2021-01-06 07:33:37 +00:00
|
|
|
<Card style={{ cursor: 'pointer', border: 'solid', width: "95%" }}>
|
|
|
|
<Card.Img variant="top" src={item.thumb} style={{
|
|
|
|
width: "100%", height: "150px"
|
|
|
|
}} />
|
2021-01-06 07:17:56 +00:00
|
|
|
<Card.Body>
|
|
|
|
<Card.Text>{item.collectionName}</Card.Text>
|
|
|
|
</Card.Body>
|
2021-01-05 07:36:35 +00:00
|
|
|
</Card>
|
2021-01-06 07:17:56 +00:00
|
|
|
</CollectionDropZone>
|
2021-01-05 07:17:17 +00:00
|
|
|
));
|
2021-01-05 05:25:08 +00:00
|
|
|
return (
|
2021-01-05 07:17:17 +00:00
|
|
|
<Modal
|
|
|
|
show={modalView}
|
|
|
|
aria-labelledby='contained-modal-title-vcenter'
|
|
|
|
centered
|
|
|
|
onHide={closeModal}
|
|
|
|
>
|
|
|
|
<Modal.Header closeButton>
|
|
|
|
<Modal.Title id='contained-modal-title-vcenter'>
|
2021-01-05 07:36:35 +00:00
|
|
|
Select/Click on Collection to upload
|
2021-01-05 07:17:17 +00:00
|
|
|
</Modal.Title>
|
|
|
|
</Modal.Header>
|
2021-01-06 07:17:56 +00:00
|
|
|
<Modal.Body style={{ display: "flex", justifyContent: "space-between", flexWrap: "wrap" }}>
|
|
|
|
{CollectionIcons}
|
2021-01-05 07:17:17 +00:00
|
|
|
</Modal.Body>
|
|
|
|
<Modal.Footer>
|
|
|
|
<Button onClick={closeModal}>Close</Button>
|
|
|
|
</Modal.Footer>
|
|
|
|
</Modal>
|
2021-01-05 05:25:08 +00:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default CollectionSelector;
|