fix(desktop): remove duplicate getCronJobRuns() call in CronJobSidebarRuns
The separate useEffect for visible-triggered immediate load was firing simultaneously with the initial load in the main effect when visible=true on mount, causing duplicate requests. The main effect already handles initial load when visible, so the separate effect is redundant. Part of PR #75395.
This commit is contained in:
parent
6502e441d4
commit
3fbbc9c1d4
|
|
@ -371,19 +371,6 @@ function CronJobSidebarRuns({ jobId, onOpenRun }: { jobId: string; onOpenRun: (s
|
|||
// cronChangeTick: a fired run reloads the peek immediately.
|
||||
}, [changeEventsAvailable, cronChangeTick, jobId, visible])
|
||||
|
||||
// Separate effect to trigger immediate load when pane becomes visible
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
getCronJobRuns(jobId, PEEK_RUN_LIMIT)
|
||||
.then(result => {
|
||||
setRuns(result)
|
||||
})
|
||||
.catch(() => {
|
||||
setRuns(prev => prev ?? [])
|
||||
})
|
||||
}
|
||||
}, [visible, jobId])
|
||||
|
||||
return (
|
||||
<div className="mb-1 ml-[1.375rem] flex flex-col gap-px">
|
||||
{runs === null ? (
|
||||
|
|
|
|||
Loading…
Reference in New Issue