add empty label text to JobList
This commit is contained in:
@@ -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>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user