({
data,
}: {
data: Workflow
})
| 146 | }; |
| 147 | |
| 148 | export const WorkflowItem = ({ |
| 149 | data, |
| 150 | }: { |
| 151 | data: Workflow |
| 152 | }) => { |
| 153 | const removeWorkflow = useRemoveWorkflow(); |
| 154 | |
| 155 | const handleRemove = () => { |
| 156 | removeWorkflow.mutate({ id: data.id }); |
| 157 | } |
| 158 | |
| 159 | return ( |
| 160 | <EntityItem |
| 161 | href={`/workflows/${data.id}`} |
| 162 | title={data.name} |
| 163 | subtitle={ |
| 164 | <> |
| 165 | Updated {formatDistanceToNow(data.updatedAt, { addSuffix: true })}{" "} |
| 166 | • Created{" "} |
| 167 | {formatDistanceToNow(data.createdAt, { addSuffix: true })} |
| 168 | </> |
| 169 | } |
| 170 | image={ |
| 171 | <div className="size-8 flex items-center justify-center"> |
| 172 | <WorkflowIcon className="size-5 text-muted-foreground" /> |
| 173 | </div> |
| 174 | } |
| 175 | onRemove={handleRemove} |
| 176 | isRemoving={removeWorkflow.isPending} |
| 177 | /> |
| 178 | ) |
| 179 | } |
nothing calls this directly
no test coverage detected