From 53a1d33a5503cced37e75402430432711820d73d Mon Sep 17 00:00:00 2001 From: ts_salikhov Date: Mon, 17 Oct 2022 17:19:13 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B0=20=D1=81=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=86=D0=B5=20=D1=81=D0=BA=D0=B0=D1=87=D0=B8=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20=D0=B8?= =?UTF-8?q?=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=BE=20=D0=BD?= =?UTF-8?q?=D0=B0=D0=B7=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=84=D0=B0=D0=B9?= =?UTF-8?q?=D0=BB=D0=B0=20=D0=B8=20=D0=BF=D0=B5=D1=80=D0=B5=D1=85=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BD=D0=B0=20=D0=BF=D1=80=D0=B5=D0=B4=D1=8B=D0=B4?= =?UTF-8?q?=D1=83=D1=89=D1=83=D1=8E=20=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8?= =?UTF-8?q?=D1=86=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/FileDownload.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pages/FileDownload.jsx b/src/pages/FileDownload.jsx index 9995ae9..496826b 100644 --- a/src/pages/FileDownload.jsx +++ b/src/pages/FileDownload.jsx @@ -1,5 +1,5 @@ import { Link, useLocation, useNavigate, useParams } from 'react-router-dom' -import { memo, useCallback, useEffect, useState } from 'react' +import { memo, useCallback, useEffect, useMemo, useState } from 'react' import { InfoCircleFilled, CloseCircleOutlined } from '@ant-design/icons' import { Button, Result, Typography } from 'antd' @@ -21,7 +21,7 @@ const FileDownload = memo(function FileDownload() { const navigate = useNavigate() const location = useLocation() - const isFirstOpenApp = location.key === 'default' + const isFirstOpenApp = useMemo(() => location.key === 'default', [location]) useEffect(() => { invokeWebApiWrapperAsync( @@ -45,7 +45,7 @@ const FileDownload = memo(function FileDownload() { }, { actionName: 'Получение информации о файле' } ) - }, [idWell, idFile]) + }, [idFile]) const download = useCallback(async () => { if (!file || !await downloadFile(file))