From 834bdf46beaefc6cc471df57ec8114910afb1651 Mon Sep 17 00:00:00 2001 From: "Timothy J. Baek" Date: Tue, 28 May 2024 15:47:14 -0700 Subject: [PATCH] refac --- src/lib/components/admin/Settings/Pipelines.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/components/admin/Settings/Pipelines.svelte b/src/lib/components/admin/Settings/Pipelines.svelte index dda33d055..303710a05 100644 --- a/src/lib/components/admin/Settings/Pipelines.svelte +++ b/src/lib/components/admin/Settings/Pipelines.svelte @@ -38,6 +38,7 @@ if (res) { toast.success('Valves updated successfully'); + setPipelines(); saveHandler(); } } else { @@ -45,12 +46,16 @@ } }; - onMount(async () => { + const setPipelines = async () => { pipelines = await getPipelines(localStorage.token); if (pipelines.length > 0) { selectedPipelineIdx = 0; } + }; + + onMount(async () => { + setPipelines(); });