add Jobs components
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user