Refactor: move convert-test-name to cardComponent folder

This commit is contained in:
igorrCarvalho 2024-05-21 20:27:22 -03:00
commit aef52637f6
3 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@ import { storeComponent } from "../../types/store";
import cloneFLowWithParent, {
getInputsAndOutputs,
} from "../../utils/storeUtils";
import { cn, convertTestName } from "../../utils/utils";
import { cn } from "../../utils/utils";
import IconComponent from "../genericIconComponent";
import ShadTooltip from "../shadTooltipComponent";
import { Button } from "../ui/button";
@ -23,6 +23,7 @@ import {
CardTitle,
} from "../ui/card";
import Loading from "../ui/loading";
import { convertTestName } from "./utils/convert-test-name";
export default function CollectionCardComponent({
data,

View file

@ -0,0 +1,3 @@
export function convertTestName(name: string): string {
return name.replace(/ /g, "-").toLowerCase();
}

View file

@ -351,10 +351,6 @@ export function freezeObject(obj: any) {
return JSON.parse(JSON.stringify(obj));
}
export function convertTestName(name: string): string {
return name.replace(/ /g, "-").toLowerCase();
}
export function sortByName(stringList: string[]): string[] {
return stringList.sort((a, b) => a.localeCompare(b));
}