feat(extraSidebarComponent): add FlowType to saveFlow object to improve type safety and include flow name, id, and description in the saved flow data
This commit is contained in:
parent
833d8ec30c
commit
550e1ef8ef
1 changed files with 5 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ import ApiModal from "../../../../modals/ApiModal";
|
||||||
import ConfirmationModal from "../../../../modals/ConfirmationModal";
|
import ConfirmationModal from "../../../../modals/ConfirmationModal";
|
||||||
import ExportModal from "../../../../modals/exportModal";
|
import ExportModal from "../../../../modals/exportModal";
|
||||||
import { APIClassType, APIObjectType } from "../../../../types/api";
|
import { APIClassType, APIObjectType } from "../../../../types/api";
|
||||||
|
import { FlowType } from "../../../../types/flow";
|
||||||
import {
|
import {
|
||||||
nodeColors,
|
nodeColors,
|
||||||
nodeIconsLucide,
|
nodeIconsLucide,
|
||||||
|
|
@ -106,7 +107,10 @@ export default function ExtraSidebar(): JSX.Element {
|
||||||
|
|
||||||
const handleShareFlow = () => {
|
const handleShareFlow = () => {
|
||||||
const reactFlow = flow!.data as ReactFlowJsonObject;
|
const reactFlow = flow!.data as ReactFlowJsonObject;
|
||||||
const saveFlow = {
|
const saveFlow: FlowType = {
|
||||||
|
name: flow!.name,
|
||||||
|
id: flow!.id,
|
||||||
|
description: flow!.description,
|
||||||
data: {
|
data: {
|
||||||
...reactFlow,
|
...reactFlow,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue