From 73a1725eb94014e99e7945c4f9391f3af6924236 Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 20 Oct 2024 02:40:17 +0200 Subject: [PATCH] Fix QueuePopUp not showing any jobs --- Website/modules/QueuePopUp.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Website/modules/QueuePopUp.tsx b/Website/modules/QueuePopUp.tsx index 1ea6276..a46fa57 100644 --- a/Website/modules/QueuePopUp.tsx +++ b/Website/modules/QueuePopUp.tsx @@ -19,10 +19,11 @@ export default function QueuePopUp({closeQueue} : {closeQueue(): void}){ return Job.GetJobs(jobs); return []; }) - .then(setStandbyJobs) - .finally(() => { + .then((jobs) => { console.debug("Removing Metadata Jobs"); - setStandbyJobs(StandbyJobs.filter(job => job.jobType <= 1)); + console.log(StandbyJobs) + setStandbyJobs(jobs.filter(job => job.jobType <= 1)); + console.log(StandbyJobs) }); Job.GetRunningJobs() .then((jobs) => { @@ -30,10 +31,9 @@ export default function QueuePopUp({closeQueue} : {closeQueue(): void}){ return Job.GetJobs(jobs); return []; }) - .then(setRunningJobs) - .finally(() =>{ + .then((jobs) =>{ console.debug("Removing Metadata Jobs"); - setRunningJobs(RunningJobs.filter(job => job.jobType <= 1)); + setRunningJobs(jobs.filter(job => job.jobType <= 1)); }); }, []);