MCPcopy Create free account
hub / github.com/code-with-antonio/nodebase / WorkflowItem

Function WorkflowItem

src/features/workflows/components/workflows.tsx:148–179  ·  view source on GitHub ↗
({
  data,
}: { 
  data: Workflow
})

Source from the content-addressed store, hash-verified

146};
147
148export 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 &bull; 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}

Callers

nothing calls this directly

Calls 1

useRemoveWorkflowFunction · 0.90

Tested by

no test coverage detected