passed Setprogress as prop to File Upload component

This commit is contained in:
Abhinav-grd 2021-01-05 16:44:19 +05:30
parent 38ef6d12bc
commit ae03343066
2 changed files with 9 additions and 2 deletions

View file

@ -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={{

View file

@ -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}