Unverified Commit e92c896a authored by linfeng's avatar linfeng Committed by GitHub

Merge pull request #5 from LollipopsAndWine/feat/ade/dev

feat: queue loading
parents 076a2a14 21945ffc
...@@ -52,6 +52,7 @@ ...@@ -52,6 +52,7 @@
"eslint-plugin-react-hooks": "^5.1.0-rc.0", "eslint-plugin-react-hooks": "^5.1.0-rc.0",
"eslint-plugin-react-refresh": "^0.4.9", "eslint-plugin-react-refresh": "^0.4.9",
"globals": "^15.9.0", "globals": "^15.9.0",
"less": "^4.2.0",
"postcss": "^8.4.41", "postcss": "^8.4.41",
"sass-embedded": "^1.77.8", "sass-embedded": "^1.77.8",
"tailwindcss": "^3.4.10", "tailwindcss": "^3.4.10",
......
...@@ -21,13 +21,12 @@ interface IPdfExtractionProps { ...@@ -21,13 +21,12 @@ interface IPdfExtractionProps {
} }
const PdfExtraction = ({ className = "" }: IPdfExtractionProps) => { const PdfExtraction = ({ className = "" }: IPdfExtractionProps) => {
const newData = useJobExtraction();
const { const {
refreshQueue, refreshQueue,
taskInfo, taskInfo,
isLoading: queueLoading, isLoading: queueLoading,
isError: compileError, isError: compileError,
} = newData; } = useJobExtraction();
const [pdfState, setPdfState] = useState({ const [pdfState, setPdfState] = useState({
page: 1, page: 1,
......
...@@ -103,6 +103,9 @@ export const useJobExtraction = () => { ...@@ -103,6 +103,9 @@ export const useJobExtraction = () => {
} else { } else {
setIsPolling(false); setIsPolling(false);
setQueueLoading(false); setQueueLoading(false);
getExtractTaskIdProgress(jobID!).then((res) => {
setTaskInfo(res as any);
});
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment