add empty label text to JobList

This commit is contained in:
bluemoehre
2026-07-13 14:57:41 +02:00
parent f658f77b57
commit 8f1f724c53
+3 -2
View File
@@ -3,14 +3,15 @@ import { cn } from "@/lib/utils"
export interface JobListProps {
jobs: JobListItemProps[]
emptyLabel?: string
className?: string
}
export function JobList({ jobs, className }: JobListProps) {
export function JobList({ jobs, emptyLabel = "No running 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>
<p className="my-4 text-sm text-center text-muted-foreground">{emptyLabel ?? 'No jobs.'}</p>
</div>
)
}