Refactor: move convert-test-name to cardComponent folder
This commit is contained in:
parent
05859becd4
commit
aef52637f6
3 changed files with 5 additions and 5 deletions
|
|
@ -11,7 +11,7 @@ import { storeComponent } from "../../types/store";
|
||||||
import cloneFLowWithParent, {
|
import cloneFLowWithParent, {
|
||||||
getInputsAndOutputs,
|
getInputsAndOutputs,
|
||||||
} from "../../utils/storeUtils";
|
} from "../../utils/storeUtils";
|
||||||
import { cn, convertTestName } from "../../utils/utils";
|
import { cn } from "../../utils/utils";
|
||||||
import IconComponent from "../genericIconComponent";
|
import IconComponent from "../genericIconComponent";
|
||||||
import ShadTooltip from "../shadTooltipComponent";
|
import ShadTooltip from "../shadTooltipComponent";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
|
|
@ -23,6 +23,7 @@ import {
|
||||||
CardTitle,
|
CardTitle,
|
||||||
} from "../ui/card";
|
} from "../ui/card";
|
||||||
import Loading from "../ui/loading";
|
import Loading from "../ui/loading";
|
||||||
|
import { convertTestName } from "./utils/convert-test-name";
|
||||||
|
|
||||||
export default function CollectionCardComponent({
|
export default function CollectionCardComponent({
|
||||||
data,
|
data,
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
export function convertTestName(name: string): string {
|
||||||
|
return name.replace(/ /g, "-").toLowerCase();
|
||||||
|
}
|
||||||
|
|
@ -351,10 +351,6 @@ export function freezeObject(obj: any) {
|
||||||
return JSON.parse(JSON.stringify(obj));
|
return JSON.parse(JSON.stringify(obj));
|
||||||
}
|
}
|
||||||
|
|
||||||
export function convertTestName(name: string): string {
|
|
||||||
return name.replace(/ /g, "-").toLowerCase();
|
|
||||||
}
|
|
||||||
|
|
||||||
export function sortByName(stringList: string[]): string[] {
|
export function sortByName(stringList: string[]): string[] {
|
||||||
return stringList.sort((a, b) => a.localeCompare(b));
|
return stringList.sort((a, b) => a.localeCompare(b));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue