diff --git a/frontend/dashboard/src/pages/Report/Log/List.tsx b/frontend/dashboard/src/pages/Report/Log/List.tsx index 4ac7e04f..4cb3c355 100644 --- a/frontend/dashboard/src/pages/Report/Log/List.tsx +++ b/frontend/dashboard/src/pages/Report/Log/List.tsx @@ -175,6 +175,7 @@ export default function List() { const createMenu = Boolean(anchorEl); const importForm = useRef(null); const [currentImportFileName, setCurrentImportFileName] = useState(null); + const [importLoading, setImportLoading] = useState(false); const handleClick = (event: React.MouseEvent) => { setAnchorEl(event.currentTarget); @@ -205,7 +206,7 @@ export default function List() { Object.keys(appliedParams).length !== 0 ? appliedParams : Object.fromEntries([...searchParams.entries(), ['order', order], ['orderBy', orderBy]]); - + setImportLoading(true); axios.get('/report/logs/export', { params: { ...parameters }, }).then((response) => { @@ -215,6 +216,7 @@ export default function List() { document.body.appendChild(link); link.click(); handleClose(); + setImportLoading(false); }); // axios.get(`report/logs/export`) // .then((response) => { @@ -240,14 +242,15 @@ export default function List() { {!currentImportFileName && ( - +