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,
|
removeFileNameFromComponents,
|
||||||
removeGlobalVariableFromComponents,
|
removeGlobalVariableFromComponents,
|
||||||
} from "../../utils/reactflowUtils";
|
} from "../../utils/reactflowUtils";
|
||||||
import { getTagsIds } from "../../utils/storeUtils";
|
|
||||||
import BaseModal from "../baseModal";
|
import BaseModal from "../baseModal";
|
||||||
import ConfirmationModal from "../confirmationModal";
|
import ConfirmationModal from "../confirmationModal";
|
||||||
import ExportModal from "../exportModal";
|
import ExportModal from "../exportModal";
|
||||||
|
import getTagsIds from "./utils/get-tags-ids";
|
||||||
|
|
||||||
export default function ShareModal({
|
export default function ShareModal({
|
||||||
component,
|
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;
|
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[]) {
|
export function getInputsAndOutputs(nodes: Node[]) {
|
||||||
let inputs: { type: string; id: string; displayName: string }[] = [];
|
let inputs: { type: string; id: string; displayName: string }[] = [];
|
||||||
let outputs: { 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