From a6c823087cafd28922bbe797658c9718883c6aaf Mon Sep 17 00:00:00 2001 From: veselovnk Date: Tue, 4 Jun 2024 13:29:45 +0300 Subject: [PATCH] MSP-3391 remove delay for closing modal --- src/components/ApplicationsContent/index.tsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/components/ApplicationsContent/index.tsx b/src/components/ApplicationsContent/index.tsx index 8bea8ec..c061d49 100644 --- a/src/components/ApplicationsContent/index.tsx +++ b/src/components/ApplicationsContent/index.tsx @@ -1,4 +1,4 @@ -import { LinkOutlined } from '@ant-design/icons' +import { FileProtectOutlined } from '@ant-design/icons' import { List, message, Spin, Tooltip } from 'antd' import { Layout } from 'isp-ui-kit' import { ColumnItem } from 'isp-ui-kit/dist/Layout/Column/column.type' @@ -120,12 +120,14 @@ const ApplicationsContent: FC = ({ createApplicationService(newApplicationApp) .unwrap() - .then(() => message.success('Элемент сохранен')) - .catch(() => message.error('Ошибка добавления элемента')).finally(()=> setShowApplicationsModal({ - ...showApplicationsModal, - addModal: false - })) - + .then(() => { + message.success('Элемент сохранен') + setShowApplicationsModal({ + ...showApplicationsModal, + addModal: false + }) + }) + .catch(() => message.error('Ошибка добавления элемента')) } const handleRemoveApplicationApp = (id: number) => removeApplicationsService([id])