Skip to content

Commit

Permalink
refactor(ui): Remove useless flex
Browse files Browse the repository at this point in the history
  • Loading branch information
topher-lo committed Mar 5, 2024
1 parent ca5d3fc commit 7f7f56d
Showing 1 changed file with 17 additions and 27 deletions.
44 changes: 17 additions & 27 deletions frontend/src/components/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,34 +35,24 @@ export function WorkflowPanel() {
});

return (
<div className="flex flex-col h-full">
<div className="flex-1 flex">
<div className="flex-1">
{isActionNodeSelected && selectedActionNodeId && selectedActionNodeType ? (
<ActionForm actionId={selectedActionNodeId} actionType={selectedActionNodeType} />
) : (!isActionNodeSelected && workflowId && workflowTitle && workflowDescription && workflowStatus) ? (
<WorkflowForm
workflowId={workflowId}
workflowTitle={workflowTitle}
workflowDescription={workflowDescription}
workflowStatus={workflowStatus}
/>
) : (
<div className="flex flex-col h-full">
<div className="flex-1 flex">
<div className="flex-1">
<div className="flex items-center space-x-2 p-4">
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
</div>
</div>
</div>
</div>
)}
<div className="flex-1">
{isActionNodeSelected && selectedActionNodeId && selectedActionNodeType ? (
<ActionForm actionId={selectedActionNodeId} actionType={selectedActionNodeType} />
) : (!isActionNodeSelected && workflowId && workflowTitle && workflowDescription && workflowStatus) ? (
<WorkflowForm
workflowId={workflowId}
workflowTitle={workflowTitle}
workflowDescription={workflowDescription}
workflowStatus={workflowStatus}
/>
) : (
<div className="w-full space-x-2 p-4">
<div className="space-y-2">
<Skeleton className="h-4 w-[250px]" />
<Skeleton className="h-4 w-[200px]" />
</div>
</div>
</div>
)}
</div>
);
}

0 comments on commit 7f7f56d

Please sign in to comment.