diff --git a/src/frontend/src/modals/shareModal/index.tsx b/src/frontend/src/modals/shareModal/index.tsx index 75c3c1382..b6c5a2aed 100644 --- a/src/frontend/src/modals/shareModal/index.tsx +++ b/src/frontend/src/modals/shareModal/index.tsx @@ -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, diff --git a/src/frontend/src/modals/shareModal/utils/get-tags-ids.tsx b/src/frontend/src/modals/shareModal/utils/get-tags-ids.tsx new file mode 100644 index 000000000..9bb71e20e --- /dev/null +++ b/src/frontend/src/modals/shareModal/utils/get-tags-ids.tsx @@ -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); +} diff --git a/src/frontend/src/utils/storeUtils.ts b/src/frontend/src/utils/storeUtils.ts index c0a0fc440..9c2735a35 100644 --- a/src/frontend/src/utils/storeUtils.ts +++ b/src/frontend/src/utils/storeUtils.ts @@ -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 }[] = [];