diff --git a/src/pages/Report/ReportCreationNotify.jsx b/src/pages/Report/ReportCreationNotify.jsx index fdf76ad..a62dbb2 100644 --- a/src/pages/Report/ReportCreationNotify.jsx +++ b/src/pages/Report/ReportCreationNotify.jsx @@ -1,25 +1,29 @@ -import { Progress, Button } from "antd" -import { downloadFile } from "../../components/factory" +import { Progress, Button } from 'antd' +import { downloadFile } from '../../components/factory' -export const ReportCreationNotify = ({progressData}) => { - progressData = progressData ?? {progress: 0.0, operation: 'Создание отчета'} - - let downloadButton = null - if (progressData.file) - downloadButton = - - const progressText = `${progressData.operation} стр ${progressData.currentPage} из ${progressData.totalPages}` - return ( - <> - -
- {progressText} - {downloadButton} + )} - ) -} \ No newline at end of file +) + +ReportCreationNotify.defaultProps = { + progressData: { + progress: 0.0, + operation: 'Создание отчета', + currentPage: 0, + totalPages: 0, + file: null + } +}