From 1a832694b442e2cc4560678c2338fa411b208fc1 Mon Sep 17 00:00:00 2001 From: goodmice Date: Fri, 29 Oct 2021 17:49:06 +0500 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D0=B5=20=D0=BE=20=D1=84=D0=BE=D1=80=D0=BC=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B8=20=D0=BE=D1=82=D1=87=D1=91?= =?UTF-8?q?=D1=82=D0=B0=20=D0=B8=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Report/ReportCreationNotify.jsx | 46 ++++++++++++----------- 1 file changed, 25 insertions(+), 21 deletions(-) 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 + } +}