passed Setprogress as prop to File Upload component
This commit is contained in:
parent
38ef6d12bc
commit
ae03343066
|
@ -2,13 +2,18 @@ import React from 'react';
|
|||
import { Button, Card, Col, Container, Modal, Row } from 'react-bootstrap';
|
||||
import FileUpload from './DragAndDropUpload';
|
||||
|
||||
function CollectionSelector({ modalView, closeModal, collectionLatestFile }) {
|
||||
|
||||
function CollectionSelector({
|
||||
modalView,
|
||||
closeModal,
|
||||
collectionLatestFile,
|
||||
showProgress,
|
||||
}) {
|
||||
const CollectionIcons = collectionLatestFile.map((item) => (
|
||||
<FileUpload
|
||||
closeModal={closeModal}
|
||||
collectionLatestFile={item}
|
||||
noDragEventsBubbling
|
||||
showProgress={showProgress}
|
||||
>
|
||||
<Card
|
||||
style={{
|
||||
|
|
|
@ -36,6 +36,7 @@ const FileUpload = ({
|
|||
showModal = null,
|
||||
collectionLatestFile = null,
|
||||
noDragEventsBubbling = null,
|
||||
showProgress = null,
|
||||
}) => {
|
||||
return (
|
||||
<>
|
||||
|
@ -43,6 +44,7 @@ const FileUpload = ({
|
|||
onDrop={(acceptedFiles) => {
|
||||
console.log(collectionLatestFile.collectionName);
|
||||
closeModal();
|
||||
showProgress();
|
||||
}}
|
||||
noClick={noClick}
|
||||
onDragOver={showModal}
|
||||
|
|
Loading…
Reference in a new issue