mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-04-12 14:28:19 +02:00
Do not update Queue-preview when not shown
This commit is contained in:
parent
63b10600da
commit
1ed376ba47
@ -14,7 +14,7 @@ export default function QueuePopUp({connectedToBackend, children, apiUri, checkC
|
||||
const [queueListInterval, setQueueListInterval] = React.useState<number | undefined>(undefined);
|
||||
|
||||
useEffect(() => {
|
||||
if(connectedToBackend) {
|
||||
if(connectedToBackend && showQueuePopup) {
|
||||
UpdateMonitoringJobsList();
|
||||
if(queueListInterval === undefined){
|
||||
setQueueListInterval(setInterval(() => {
|
||||
@ -25,7 +25,7 @@ export default function QueuePopUp({connectedToBackend, children, apiUri, checkC
|
||||
clearInterval(queueListInterval);
|
||||
setQueueListInterval(undefined);
|
||||
}
|
||||
}, [connectedToBackend]);
|
||||
}, [connectedToBackend, showQueuePopup]);
|
||||
|
||||
function UpdateMonitoringJobsList(){
|
||||
JobFunctions.GetJobsInState(apiUri, JobState.Waiting)
|
||||
|
Loading…
x
Reference in New Issue
Block a user