From 995daba4293e546c430b85bc335aac3814fe9f82 Mon Sep 17 00:00:00 2001 From: Kerem Yilmaz Date: Tue, 10 Sep 2024 11:52:03 -0700 Subject: [PATCH] Invalidate workflows query when saved (#803) Co-authored-by: Muhammed Salih Altun --- .../workflows/WorkflowsBetaAlertCard.tsx | 37 +++++++++++++++++++ .../workflows/editor/WorkflowEditor.tsx | 3 ++ 2 files changed, 40 insertions(+) create mode 100644 skyvern-frontend/src/routes/workflows/WorkflowsBetaAlertCard.tsx diff --git a/skyvern-frontend/src/routes/workflows/WorkflowsBetaAlertCard.tsx b/skyvern-frontend/src/routes/workflows/WorkflowsBetaAlertCard.tsx new file mode 100644 index 00000000..44ccb297 --- /dev/null +++ b/skyvern-frontend/src/routes/workflows/WorkflowsBetaAlertCard.tsx @@ -0,0 +1,37 @@ +import { Button } from "@/components/ui/button"; + +function WorkflowsBetaAlertCard() { + return ( +
+
+

Workflows (Beta)

+
+
Workflows through UI are currently under construction.
+
+ Today, you can create and run workflows through the Skyvern API. +
+
+ + +
+
+ ); +} + +export { WorkflowsBetaAlertCard }; diff --git a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx index faf969a7..15f8a976 100644 --- a/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx +++ b/skyvern-frontend/src/routes/workflows/editor/WorkflowEditor.tsx @@ -64,6 +64,9 @@ function WorkflowEditor() { queryClient.invalidateQueries({ queryKey: ["workflow", workflowPermanentId], }); + queryClient.invalidateQueries({ + queryKey: ["workflows"], + }); }, onError: (error: AxiosError) => { toast({