import { UploadOutlined } from "@ant-design/icons"; import { Upload } from "antd"; import React from "react"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop, selectCurrentUser, } from "../../redux/user/user.selectors"; import { handleUpload } from "./documents-upload.utility"; const mapStateToProps = createStructuredSelector({ currentUser: selectCurrentUser, bodyshop: selectBodyshop, }); export function DocumentsUploadComponent({ children, currentUser, bodyshop, jobId, tagsArray, billId, callbackAfterUpload, }) { return ( handleUpload(ev, { bodyshop: bodyshop, uploaded_by: currentUser.email, jobId: jobId, billId: billId, tagsArray: tagsArray, callback: callbackAfterUpload, }) } accept="audio/*, video/*, image/*, .pdf, .doc, .docx, .xls, .xlsx" // showUploadList={false} > { // } {children || ( <>

Click or drag files to this area to upload.

)}
); } export default connect(mapStateToProps, null)(DocumentsUploadComponent);