This commit is contained in:
Marshal
2026-07-21 13:24:05 +00:00
parent 07c390a3b2
commit 42e5dd3a26
8 changed files with 28 additions and 7 deletions

View File

@@ -4,3 +4,17 @@ import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
/** Human label for a trade direction — DOMESTIC reads "Intercity" everywhere. */
export function directionLabel(direction?: string | null): string {
switch (direction) {
case "IMPORT":
return "Import";
case "EXPORT":
return "Export";
case "DOMESTIC":
return "Intercity";
default:
return direction || "—";
}
}