forked from ddrilling/asb_cloud_front
На странице скачивания файла исправлено название файла и переход на предыдущую страницу
This commit is contained in:
parent
1a4189901a
commit
53a1d33a55
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user