Refactor: move get-tags-ids to shareModal folder
This commit is contained in:
parent
e2ca4b79f8
commit
c795a36468
3 changed files with 9 additions and 10 deletions
|
|
@ -22,10 +22,10 @@ import {
|
|||
removeFileNameFromComponents,
|
||||
removeGlobalVariableFromComponents,
|
||||
} from "../../utils/reactflowUtils";
|
||||
import { getTagsIds } from "../../utils/storeUtils";
|
||||
import BaseModal from "../baseModal";
|
||||
import ConfirmationModal from "../confirmationModal";
|
||||
import ExportModal from "../exportModal";
|
||||
import getTagsIds from "./utils/get-tags-ids";
|
||||
|
||||
export default function ShareModal({
|
||||
component,
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
export default function getTagsIds(
|
||||
tags: string[],
|
||||
tagListId: { name: string; id: string }[],
|
||||
) {
|
||||
return tags
|
||||
.map((tag) => tagListId.find((tagObj) => tagObj.name === tag))!
|
||||
.map((tag) => tag!.id);
|
||||
}
|
||||
|
|
@ -20,15 +20,6 @@ export default function cloneFLowWithParent(
|
|||
return childFLow;
|
||||
}
|
||||
|
||||
export function getTagsIds(
|
||||
tags: string[],
|
||||
tagListId: { name: string; id: string }[],
|
||||
) {
|
||||
return tags
|
||||
.map((tag) => tagListId.find((tagObj) => tagObj.name === tag))!
|
||||
.map((tag) => tag!.id);
|
||||
}
|
||||
|
||||
export function getInputsAndOutputs(nodes: Node[]) {
|
||||
let inputs: { type: string; id: string; displayName: string }[] = [];
|
||||
let outputs: { type: string; id: string; displayName: string }[] = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue