From dd3989946202c93bd1b6bd0f9e85d46433cde6db Mon Sep 17 00:00:00 2001 From: Abel Rodriguez Date: Wed, 20 Sep 2023 23:05:21 -0500 Subject: [PATCH] move state update inside timeout --- .../src/components/pipelines/PipelineExecutions.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/spin-observatory-plugin-deck/src/components/pipelines/PipelineExecutions.tsx b/spin-observatory-plugin-deck/src/components/pipelines/PipelineExecutions.tsx index b5be370..0090c33 100644 --- a/spin-observatory-plugin-deck/src/components/pipelines/PipelineExecutions.tsx +++ b/spin-observatory-plugin-deck/src/components/pipelines/PipelineExecutions.tsx @@ -104,11 +104,10 @@ export const PipelineExecutions = ({ setTimeout(() => { console.log('setting timeout'); + setIsRequestInProgress(false); + console.log("request completed"); }, 40000); - setIsRequestInProgress(false); - console.log("request completed"); - setExecutions(resp); setFilteredExecutions(filterExecutions(resp)); setStatusCount(getStatusCount(resp));