diff --git a/skyvern-frontend/src/components/StatusBadge.tsx b/skyvern-frontend/src/components/StatusBadge.tsx index 6428fcde0..59ad1982b 100644 --- a/skyvern-frontend/src/components/StatusBadge.tsx +++ b/skyvern-frontend/src/components/StatusBadge.tsx @@ -1,29 +1,31 @@ import { Status } from "@/api/types"; import { Badge } from "./ui/badge"; +import { cn } from "@/util/utils"; type Props = { status: Status; }; function StatusBadge({ status }: Props) { - let variant: "default" | "success" | "destructive" | "warning" = "default"; - if (status === "completed") { - variant = "success"; - } else if ( - status === "failed" || - status === "terminated" || - status === "timed_out" || - status === "canceled" - ) { - variant = "destructive"; - } else if (status === "running") { - variant = "warning"; - } - const statusText = status === "timed_out" ? "timed out" : status; return ( - + {statusText} );