import Dropzone from 'react-dropzone'; import FileDropzone from "../FileDropzone"; import moment from "moment"; const LIMIT = 10000000; const LIMIT_FILES = 10; export default class FileDropzoneDeals extends FileDropzone { render() { const { files, onAddFile, onDeleteFile, } = this.props; return ( <> { files.length > 0 && (
{ files.map((file, index) => (
PDF
{ file.name } { moment().format("DD.MM.YYYY") }
)) } {/*}

{ file.size > LIMIT && (Ошибка, превышен допустимый размер файла в 10 мб.) } { file.name } - { parseFloat(file.size / 1000000).toFixed(file.size < 100000 ? 3 : 2) } мб. onDeleteFile(file.name) }>[ удалить ]

{*/}
) } { files.length < LIMIT_FILES && ( onAddFile(acceptedFiles) } maxFiles={ LIMIT_FILES }> { ({getRootProps, getInputProps}) => (

Перенесите файлы на экран для быстрой загрузки или выберите файл с компьютера

) }
) } ) } }