From 550e1ef8ef3e2d96ff63fb32d04802c92e98b32f Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 23 Oct 2023 17:37:08 -0300 Subject: [PATCH] feat(extraSidebarComponent): add FlowType to saveFlow object to improve type safety and include flow name, id, and description in the saved flow data --- .../FlowPage/components/extraSidebarComponent/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx index 6c6aa27bd..a84e9883b 100644 --- a/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx +++ b/src/frontend/src/pages/FlowPage/components/extraSidebarComponent/index.tsx @@ -13,6 +13,7 @@ import ApiModal from "../../../../modals/ApiModal"; import ConfirmationModal from "../../../../modals/ConfirmationModal"; import ExportModal from "../../../../modals/exportModal"; import { APIClassType, APIObjectType } from "../../../../types/api"; +import { FlowType } from "../../../../types/flow"; import { nodeColors, nodeIconsLucide, @@ -106,7 +107,10 @@ export default function ExtraSidebar(): JSX.Element { const handleShareFlow = () => { const reactFlow = flow!.data as ReactFlowJsonObject; - const saveFlow = { + const saveFlow: FlowType = { + name: flow!.name, + id: flow!.id, + description: flow!.description, data: { ...reactFlow, },