import { Skeleton } from "@/components/ui/skeleton"; import { useWorkflowLastRunQuery } from "../hooks/useWorkflowLastRunQuery"; import { basicLocalTimeFormat, basicTimeFormat } from "@/util/timeFormat"; type Props = { workflowId: string; }; function LastRunAtTime({ workflowId }: Props) { const { data, isLoading } = useWorkflowLastRunQuery({ workflowId }); if (isLoading) { return ; } if (!data) { return null; } if (data.status === "N/A") { return N/A; } return ( {basicLocalTimeFormat(data.time)} ); } export { LastRunAtTime };