add Jobs components

This commit is contained in:
bluemoehre
2026-07-01 00:19:15 +02:00
parent cb8adac08f
commit 44a21f9ea8
5 changed files with 159 additions and 2 deletions
+25
View File
@@ -0,0 +1,25 @@
import { JobListItem, type JobListItemProps } from "@/components/JobListItem"
import { cn } from "@/lib/utils"
export interface JobListProps {
jobs: JobListItemProps[]
className?: string
}
export function JobList({ jobs, className }: JobListProps) {
if (jobs.length === 0) {
return (
<div className={cn("flex flex-col gap-2", className)}>
<p className="text-sm text-muted-foreground">No running jobs.</p>
</div>
)
}
return (
<div className={cn("flex flex-col gap-2", className)}>
{jobs.map((job, index) => (
<JobListItem key={index} {...job} />
))}
</div>
)
}